Skip to content

Instantly share code, notes, and snippets.

@britisharmy
Forked from martinrusev/cron_supervisord.ini
Created December 27, 2022 18:48
Show Gist options
  • Save britisharmy/0918448ddfeb81f1ead26955e2163645 to your computer and use it in GitHub Desktop.
Save britisharmy/0918448ddfeb81f1ead26955e2163645 to your computer and use it in GitHub Desktop.
Cron supervisord
[supervisord]
nodaemon=true
loglevel=debug
[program:amon]
command=gunicorn -c gunicorn.conf.py wsgi
directory=/amon
autostart=true
autorestart=true
redirect_stderr=true
stopsignal = QUIT
[program:cron]
command = cron -f -L 15
autostart=true
autorestart=true
FROM martinrusev/amon:latest
COPY requirements.txt /var/requirements.txt
RUN pip install -r /var/requirements.txt
COPY crontab.txt /var/crontab.txt
RUN crontab /var/crontab.txt
RUN chmod 600 /etc/crontab
COPY supervisord.conf /etc/supervisord.conf
EXPOSE 8000
CMD ["/usr/local/bin/supervisord"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment