From c4962a671dcf0c1234cb202a8f6ac9778657c250 Mon Sep 17 00:00:00 2001 From: iosullivan Date: Sat, 18 Jul 2026 14:44:42 +0800 Subject: [PATCH] Fixes for more universal crontab usage --- Dockerfile | 2 +- README.md | 11 +++++++++++ cronjob | 2 +- requirements.txt | Bin 38 -> 22 bytes 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d6e47d..8c26aa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ RUN crontab /etc/cron.d/cronjob RUN touch /var/log/cron.log # Run the command on container startup -CMD cron && tail -f /var/log/cron.log \ No newline at end of file +CMD ["cron","-f" ] \ No newline at end of file diff --git a/README.md b/README.md index e69de29..d76a07f 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,11 @@ +# Simple tool for archiving CTA data to flat files +## Installation +Clone this archive, build and run the image. Pass in your API_KEY and map the output directory to your folder. +``` +git clone https://https://gitea.iosull.com/iosullivan/cta-archive +cd cta-archive +docker build -t cta-archive . +docker run cta-archive -d -e API_KEY= -v /usr/cta-archive/output/ +``` + +By default, the script runs every 5 minutes to log. This can be modified by updating the cronjob file. \ No newline at end of file diff --git a/cronjob b/cronjob index 0b72777..923e845 100644 --- a/cronjob +++ b/cronjob @@ -1 +1 @@ -2 * * * * /usr/cta-archive/archive.py +2 * * * * /usr/cta-archive/archive.py > /proc/1/fd/1 2>/proc/1/fd/2 diff --git a/requirements.txt b/requirements.txt index 9a11b4912515add77597c321e2d1324f9c3b220f..964cd0bf90b95c3846264ddc0d94b6fd705ee41b 100644 GIT binary patch literal 22 acmezWuZSU)p^%{zNES1c05LBE7XtuTA_b8E literal 38 ncmezWuZSU)p^%{zNES1c0I@9)8ZqcG7&DjvNh1bc1}+8w#e4@c