Compare commits

...

2 Commits

Author SHA1 Message Date
167575fe5d Merge pull request 'migrated to supercronic' (#53) from dev-migrate-supercronic into main
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
Reviewed-on: https://git.jbranan.com/jblu/qbit-maid/pulls/53
2023-06-23 04:05:51 -05:00
ca1430b302 migrated to supercronic
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-06-23 04:02:05 -05:00
4 changed files with 21 additions and 5 deletions

View File

@ -16,3 +16,18 @@ steps:
when: when:
branch: branch:
- main - 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*

View File

@ -1,8 +1,8 @@
FROM python:alpine3.18 FROM python:alpine3.18
WORKDIR / WORKDIR /
COPY . opt COPY . opt
RUN apk add --no-cache supercronic
RUN pip install requests RUN pip install requests
RUN pip install qbittorrent-api RUN pip install qbittorrent-api
RUN crontab /opt/crontab
RUN chmod +x /opt/entrypoint.sh RUN chmod +x /opt/entrypoint.sh
CMD ["/opt/entrypoint.sh"] CMD ["/opt/entrypoint.sh"]

View File

@ -1 +0,0 @@
0 1 * * * . /etc/environment; python /opt/qbit-maid.py >> /logfile

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
printenv | grep -v "no_proxy" >> /etc/environment CRON_CONFIG_FILE="/opt/crontab"
crond -f echo "${CRON} python /opt/qbit-maid.py" > $CRON_CONFIG_FILE
exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE