Skip to content

Instantly share code, notes, and snippets.

@adikrishnan
Created July 13, 2017 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adikrishnan/b89113a9eacf52fd0bac3813cdb278b2 to your computer and use it in GitHub Desktop.
Save adikrishnan/b89113a9eacf52fd0bac3813cdb278b2 to your computer and use it in GitHub Desktop.
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