[supervisord]
nodaemon = true
loglevel = info
logfile  = %(ENV_LOG_DIR)s/supervisord.log
pidfile  = %(ENV_SUP_RUN_DIR)s/supervisord.pid
logfile_maxbytes = 20MB
logfile_backups = 2

[unix_http_server]
file = %(ENV_SUP_RUN_DIR)s/supervisor.sock

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl = unix://%(ENV_SUP_RUN_DIR)s/supervisor.sock

[program:nginx]
directory=%(ENV_SUP_RUN_DIR)s
command=bash -c "/usr/bin/openresty -c %(ENV_CONF_DIR)s/nginx.conf -g 'daemon off;'"
stdout_logfile = %(ENV_LOG_DIR)s/%(program_name)s-%(process_num)s.log
stderr_logfile = %(ENV_LOG_DIR)s/%(program_name)s-%(process_num)s-stderr.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=7
stderr_logfile_maxbytes=100MB
stderr_logfile_backups=7
autorestart=true
autostart=true
user=root
priority=40

[program:sproxyd]
directory=%(ENV_SUP_RUN_DIR)s
process_name=%(program_name)s-%(process_num)s
numprocs=1
numprocs_start=0
# -d no daemon
# -l log on console
# -w no watchdog
# -V127 log level info
# -c config file
# -P sysfs confpath
# -A adminapi directory
# -s no sysfs do not mount FUSE sysfs
command=/usr/bin/sproxyd -dlw -V127 -c %(ENV_CONF_DIR)s/sproxyd%(process_num)s.conf -P /run%(process_num)s -A /run%(process_num)s -s
stdout_logfile = %(ENV_LOG_DIR)s/%(program_name)s-%(process_num)s.log
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=7
redirect_stderr=true
autorestart=true
autostart=true
user=root
priority=20
