diff --git a/Dockerfile b/Dockerfile index c895440..9bed3e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,12 @@ MAINTAINER Leon Haag-Fank "admin@haagfank.de" VOLUME /data WORKDIR /usr/src/app -COPY zeit-dl requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt -RUN playwright install chromium && \ - playwright install-deps chromium +COPY docker-entrypoint.sh zeit-dl requirements.txt ./ +RUN pip install -r requirements.txt +RUN playwright install chromium --with-deps -ENTRYPOINT python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" -o /data +ENV ZEITDL_USER \ + ZEITDL_PASSWORD \ + ZEITDL_OPTIONS="-o /data" + +ENTRYPOINT ["./docker-entrypoint.sh"] diff --git a/docker-compose.yaml b/docker-compose.yaml index e6509bf..0553b3c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,8 +3,7 @@ services: image: zeitdl container_name: zeitdl build: ./ - user: "${UID}:${GID}" env_file: - .env volumes: - - ${ZEITDL_MOUNT}:/data + - $ZEITDL_MOUNT:/data diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..cbeca19 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data} +chown -R $UID:$GID /data