Skip to content

Instantly share code, notes, and snippets.

@ephillipe
Last active December 17, 2015 03:19
Show Gist options
  • Select an option

  • Save ephillipe/5542582 to your computer and use it in GitHub Desktop.

Select an option

Save ephillipe/5542582 to your computer and use it in GitHub Desktop.
Elastick Beanstalk Supervisor Configuration: /opt/python/etc/supervisord.conf
[unix_http_server]
file=/opt/python/run/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
[supervisord]
logfile=/opt/python/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=10MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/opt/python/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
directory=/opt/python/current/app ; (default is not to cd during start)
;nocleanup=true ; (don't clean up tempfiles at start;default false)
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///opt/python/run/supervisor.sock
[program:httpd]
command=/opt/python/bin/nginxlauch
numprocs=1
directory=/opt/python/current/app
autostart=true
autorestart=unexpected
startsecs=1 ; number of secs prog must stay running (def. 1)
startretries=3 ; max # of serial start failures (default 3)
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
killasgroup=false ; SIGKILL the UNIX process group (def false)
stdout_logfile=/opt/python/log/nginx.out
stdout_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
redirect_stderr=true
[program:tornado-8000]
command=python /opt/python/current/app/server.py --port=8000
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8001]
command=python /opt/python/current/app/server.py --port=8001
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8002]
command=python /opt/python/current/app/server.py --port=8002
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8003]
command=python /opt/python/current/app/server.py --port=8003
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8004]
command=python /opt/python/current/app/server.py --port=8004
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8005]
command=python /opt/python/current/app/server.py --port=8005
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8006]
command=python /opt/python/current/app/server.py --port=8006
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8007]
command=python /opt/python/current/app/server.py --port=8007
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8008]
command=python /opt/python/current/app/server.py --port=8008
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
[program:tornado-8009]
command=python /opt/python/current/app/server.py --port=8009
environment=PATH="/opt/python/run/venv/bin/"
stderr_logfile = /opt/python/log/tornado-stderr.log
stdout_logfile = /opt/python/log/tornado-stdout.log
startretries = 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment