Last active
June 1, 2024 03:27
-
-
Save martinrusev/7015e393d46647dbad15 to your computer and use it in GitHub Desktop.
Cron supervisord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
@gerroon if you need a shell in your container, i presume to make changes, you can run
docker exec -ti <repo> sh
. Or do you want supervisor to spawn a shell for you?