Skip to content

Instantly share code, notes, and snippets.

@rhaseven7h
Forked from elithrar/supervisord.conf
Created April 5, 2019 03:35
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 rhaseven7h/6af7059064261f3c579d4e4c39dd5d7f to your computer and use it in GitHub Desktop.
Save rhaseven7h/6af7059064261f3c579d4e4c39dd5d7f to your computer and use it in GitHub Desktop.
Example supervisord.conf for a Go application #golang
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0770
chown=root:supervisor
[supervisord]
pidfile=/var/run/supervisord.pid
nodaemon=false
logfile=/var/log/supervisord/supervisord.log
loglevel=error
logfile_maxbytes=50MB
logfile_backups=10
childlogdir=/var/log/supervisord/
minfds=2048
minprocs=256
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:myapp]
command=/home/{{ pillar['username'] }}/bin/myapp
autostart=true
autorestart=true
startretries=10
user={{ pillar['username'] }}
directory=/srv/www/myapp/
environment=MYAPP_SETTINGS="/srv/www/myapp/prod.toml"
redirect_stderr=true
stdout_logfile=/var/log/supervisord/myapp.stdout.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment