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 9a11b49..964cd0b 100644 Binary files a/requirements.txt and b/requirements.txt differ