[supervisord]
logfile = /dev/null
loglevel = info
user = root
pidfile = /var/run/supervisord.pid
nodaemon = true

[program:backend]
directory=/execute
user = nobody
group = root
command=python3 app.py UWSGI
startsecs=10
stopsignal=QUIT
stopasgroup=true
killasgroup=true
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
stdout_logfile_maxbytes=10MB

[program:frontend]
directory=/execute
user = nobody
command=serve -s frontend -l unix:/execute/react.sock
startsecs=10
stopsignal=QUIT
stopasgroup=true
killasgroup=true

[program:nginx]
command=bash /tmp/start_nginx.sh
autostart=true
autorestart=true
user = root
startretries=5
numprocs=1
startsecs=0
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
stdout_logfile_maxbytes=10MB