From e1668dd42da1d3bb4b34df61ae8af47eb1292e88 Mon Sep 17 00:00:00 2001 From: jblu Date: Wed, 8 Apr 2026 19:10:04 -0500 Subject: [PATCH 1/2] migrated to crond --- .drone.yml | 55 --------------------------------- .gitea/workflows/docker-dev.yml | 30 ++++++++++++++++++ .gitea/workflows/docker.yml | 30 ++++++++++++++++++ Dockerfile | 8 ++--- entrypoint.sh | 7 +++-- 5 files changed, 67 insertions(+), 63 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/docker-dev.yml create mode 100644 .gitea/workflows/docker.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index b6529da..0000000 --- a/.drone.yml +++ /dev/null @@ -1,55 +0,0 @@ -kind: pipeline -name: default -steps: -- name: docker - image: plugins/docker - settings: - registry: git.jonb.io - dry_run: false - username: jblu - password: - from_secret: gittea_drone - repo: git.jonb.io/jblu/qbit-maid - tags: - - latest - when: - branch: - - main - event: - - push -- name: docker-test - image: plugins/docker - settings: - registry: git.jonb.io - dry_run: false - username: jblu - password: - from_secret: gittea_drone - repo: git.jonb.io/jblu/qbit-maid - tags: - - dev - when: - branch: - - dev* - event: - - push -- name: test-main - image: git.jonb.io/jblu/qbit-maid:latest - commands: - - python test_qbitmaid.py - - python test_write_csv.py - when: - branch: - - main - event: - - push -- name: test-dev - image: git.jonb.io/jblu/qbit-maid:dev - commands: - - python test_qbitmaid.py - - python test_write_csv.py - when: - branch: - - dev* - event: - - push \ No newline at end of file diff --git a/.gitea/workflows/docker-dev.yml b/.gitea/workflows/docker-dev.yml new file mode 100644 index 0000000..c0242c7 --- /dev/null +++ b/.gitea/workflows/docker-dev.yml @@ -0,0 +1,30 @@ +name: ci + +on: + push: + branches: + - dev* + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v4 + with: + registry: git.jonb.io + username: '${{ gitea.actor }}' + password: '${{ secrets.JONBIO_CI }}' + - + name: Set up QEMU + uses: docker/setup-qemu-action@v4 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + - + name: Build and push + uses: docker/build-push-action@v7 + with: + push: true + tags: git.jonb.io/jblu/qbit-maid:dev \ No newline at end of file diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..bb14729 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,30 @@ +name: ci + +on: + push: + branches: + - main + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v4 + with: + registry: git.jonb.io + username: '${{ gitea.actor }}' + password: '${{ secrets.JONBIO_CI }}' + - + name: Set up QEMU + uses: docker/setup-qemu-action@v4 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + - + name: Build and push + uses: docker/build-push-action@v7 + with: + push: true + tags: git.jonb.io/jblu/qbit-maid:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7998c21..eb9add2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ -FROM python:alpine3.18 +FROM python:alpine3.23 WORKDIR / -COPY . opt -RUN apk add --no-cache supercronic -RUN pip install requests -RUN pip install qbittorrent-api +COPY *.py entrypoint.sh /opt/ +RUN pip install requests qbittorrent-api RUN chmod +x /opt/entrypoint.sh CMD ["/opt/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index e776646..cc63b7d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,8 @@ #!/bin/sh -CRON_CONFIG_FILE="/opt/crontab" +CRON_CONFIG_FILE="/etc/crontabs/root" -echo "${CRON} python /opt/qbit-maid.py" > $CRON_CONFIG_FILE +echo "${CRON} python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE +echo "@reboot python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE -exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE \ No newline at end of file +exec crond -f \ No newline at end of file -- 2.49.1 From 6248b7f7215911da00e8cf23bdbea9d33354f009 Mon Sep 17 00:00:00 2001 From: jblu Date: Wed, 8 Apr 2026 19:12:43 -0500 Subject: [PATCH 2/2] update readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 153d277..01ca638 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # qbit-maid > Warning: This application removes torrents that are over the minimum age and that are not part of the ignored categories, domains or tags. Please use the delete_torrents feature set to false when first testing its functionality. -- 2.49.1