Instantly share code, notes, and snippets.

Embed
What would you like to do?
Supervisor template configurations
[supervisord]
# [program:<samplepyservice>]
[program:myapp]
# directory=<path_to_project>
directory=/var/www/myapp
# command=<path_to_project_env>/env/bin/gunicorn -b 127.0.0.1:<port_num> -w 4 <app_name>:app
command=/var/www/myapp/env/bin/gunicorn -b 127.0.0.1:5000 -w 4 myapp:app
autostart=true
autorestart=true
# user=<username>
user=aditya
redirect_stderr=true
# stdout_logfile=<path_to_log_file>
stdout_logfile=/var/log/myapp/myapp_supervisor.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=3
# stderr_logfile=<path_to_log_file>
stderr_logfile=/var/log/myapp/myapp_supervisor.log
stderr_logfile_maxbytes=10MB
stderr_logfile_backups=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment