diff --git a/.drone.yml b/.drone.yml index e724b78..80b5779 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,4 +15,19 @@ steps: - latest when: branch: - - main \ No newline at end of file + - main +steps: +- name: docker-test + image: plugins/docker + settings: + registry: git.jbranan.com + dry_run: false + username: jblu + password: + from_secret: gittea_drone + repo: git.jbranan.com/jblu/qbit-maid + tags: + - dev + when: + branch: + - dev* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6707104..7998c21 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM python:alpine3.18 WORKDIR / COPY . opt +RUN apk add --no-cache supercronic RUN pip install requests RUN pip install qbittorrent-api -RUN crontab /opt/crontab RUN chmod +x /opt/entrypoint.sh CMD ["/opt/entrypoint.sh"] \ No newline at end of file diff --git a/crontab b/crontab deleted file mode 100755 index e41642d..0000000 --- a/crontab +++ /dev/null @@ -1 +0,0 @@ -0 1 * * * . /etc/environment; python /opt/qbit-maid.py >> /logfile \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index ca10c91..e776646 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,7 @@ #!/bin/sh -printenv | grep -v "no_proxy" >> /etc/environment +CRON_CONFIG_FILE="/opt/crontab" -crond -f \ No newline at end of file +echo "${CRON} python /opt/qbit-maid.py" > $CRON_CONFIG_FILE + +exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE \ No newline at end of file