Skip to content

Instantly share code, notes, and snippets.

@hernandesbsousa
Created May 4, 2016 17:31
Show Gist options
  • Save hernandesbsousa/be2c1951adb26811f4f9b830a551ffdc to your computer and use it in GitHub Desktop.
Save hernandesbsousa/be2c1951adb26811f4f9b830a551ffdc to your computer and use it in GitHub Desktop.
Supervisor generic config with 2 workers
[program:app-sidekiq]
directory=/apps/my_app/current
command=/apps/my_app/current/bin/run bin/sidekiq -c 15
stopsignal=QUIT
stderr_logfile=/apps/my_app/current/log/sidekiq_err.log
stdout_logfile=/apps/my_app/current/log/sidekiq_out.log
user=app_user
[program:background_job]
directory=/apps/my_app/current
command=/apps/my_app/current/bin/run background_job
stopsignal=QUIT
stderr_logfile=/apps/my_app/current/log/background_job_err.log
stdout_logfile=/apps/my_app/current/log/background_job_out.log
user=app_user
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
files = /etc/supervisor/conf.d/*/config/supervisor.conf
files = /apps/my_app/current/config/supervisor.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment