From 4686827d18741c541d59031c559ca0c383dbf7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 21 Sep 2022 09:26:22 -0300 Subject: [PATCH] Ativa cronjobs --- docker/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bd6cd2d..06a44cc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -91,9 +91,11 @@ RUN ln -s ${HOME}/etc/nginx/sites-available/sigi.vhost /etc/nginx/sites-enabled/ RUN mkdir -p /var/log/sigi # schedule cron jobs -RUN crontab -l | { cat; echo "* * * * * ${HOME}/manage.py runjobs minutely >> /var/log/sigi/minutely.log"; } | crontab - -RUN crontab -l | { cat; echo "0 * * * * ${HOME}/manage.py runjobs hourly >> /var/log/sigi/hourly.log"; } | crontab - -RUN crontab -l | { cat; echo "0 0 * * * ${HOME}/manage.py runjobs daily >> /var/log/sigi/daily.log"; } | crontab - +RUN crontab -l | { cat; echo "* * * * * ${HOME}/manage.py runjobs minutely >> /var/log/sigi/cron.log"; } | crontab - +RUN crontab -l | { cat; echo "0 * * * * ${HOME}/manage.py runjobs hourly >> /var/log/sigi/cron.log"; } | crontab - +RUN crontab -l | { cat; echo "0 0 * * * ${HOME}/manage.py runjobs daily >> /var/log/sigi/cron.log"; } | crontab - +RUN crontab -l | { cat; echo "0 0 * * 0 ${HOME}/manage.py runjobs weekly >> /var/log/sigi/cron.log"; } | crontab - +RUN crontab -l | { cat; echo "0 0 1 * * ${HOME}/manage.py runjobs monthly >> /var/log/sigi/cron.log"; } | crontab - EXPOSE 80/tcp 443/tcp @@ -102,4 +104,4 @@ ENV DEBIAN_FRONTEND=teletype VOLUME ["/srv/interlegis/sigi/media"] # Start web server -CMD service nginx start && /srv/interlegis/sigi/bin/run_sigi \ No newline at end of file +CMD service cron start && service nginx start && /srv/interlegis/sigi/bin/run_sigi \ No newline at end of file