[supervisord] nodaemon=true logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid childlogdir=/var/log/supervisor [unix_http_server] file=/var/run/supervisor.sock [supervisorctl] serverurl=unix:///var/run/supervisor.sock [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface # ===== FLASK APPLICATION ===== [program:flask] command=python /app/app.py directory=/app autostart=true autorestart=true stdout_logfile=/var/log/supervisor/flask.log stderr_logfile=/var/log/supervisor/flask_error.log stopasgroup=true stopsignal=TERM priority=999 environment=PYTHONUNBUFFERED=1,FLASK_APP=app.py,FLASK_ENV=production # ===== HAPROXY ===== [program:haproxy] command=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg autostart=true autorestart=true stdout_logfile=/var/log/supervisor/haproxy.log stderr_logfile=/var/log/supervisor/haproxy_error.log stopasgroup=true priority=998 # ===== LOG ROTATION ===== [program:logrotate] command=/bin/bash -c "while true; do sleep 86400; logrotate /etc/logrotate.d/haproxy 2>/dev/null || true; done" autostart=true autorestart=true stdout_logfile=/var/log/supervisor/logrotate.log stderr_logfile=/var/log/supervisor/logrotate_error.log stopasgroup=true priority=997