36 lines
811 B
Plaintext
36 lines
811 B
Plaintext
[supervisord]
|
|
nodaemon=true
|
|
user=root
|
|
loglevel=info
|
|
logfile=/var/log/supervisor/supervisord.log
|
|
pidfile=/var/run/supervisord.pid
|
|
|
|
[program:haproxy]
|
|
command=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg
|
|
autostart=true
|
|
autorestart=true
|
|
stderr_logfile=/var/log/haproxy/haproxy.err.log
|
|
stdout_logfile=/var/log/haproxy/haproxy.log
|
|
priority=100
|
|
stopasgroup=true
|
|
killasgroup=true
|
|
|
|
[program:flask_app]
|
|
command=python /app/app.py
|
|
directory=/app
|
|
autostart=true
|
|
autorestart=true
|
|
stderr_logfile=/var/log/supervisor/flask_app.err.log
|
|
stdout_logfile=/var/log/supervisor/flask_app.out.log
|
|
priority=999
|
|
environment=FLASK_APP=/app/app.py,FLASK_ENV=production,PYTHONUNBUFFERED=1
|
|
startsecs=10
|
|
stopasgroup=true
|
|
|
|
[unix_http_server]
|
|
file=/var/run/supervisor.sock
|
|
chmod=0700
|
|
|
|
[supervisorctl]
|
|
serverurl=unix:///var/run/supervisor.sock
|