; Sample supervisor config file. ; ; For more information on the config file, please see: ; http://supervisord.org/configuration.html ; ; Notes: ; - Shell expansion ("~" or "$HOME") is not supported. Environment ; variables can be expanded using this syntax: "%(ENV_HOME)s". ; - Quotes around values are not supported, except in the case of ; the environment= options as shown below. ; - Comments must have a leading space: "a=b ;comment" not "a=b;comment". ; - Command will be truncated if it looks like a config file comment, e.g. ; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ". ; ; Warning: ; Paths throughout this example file use /tmp because it is available on most ; systems. You will likely need to change these to locations more appropriate ; for your system. Some systems periodically delete older files in /tmp. ; Notably, if the socket file defined in the [unix_http_server] section below ; is deleted, supervisorctl will be unable to connect to supervisord. [inet_http_server] ; inet (TCP) server disabled by default port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface username=%(ENV_SUPERVISOR_USERNAME)s ; default is no username (open server) password=%(ENV_SUPERVISOR_PASSWORD)s ; default is no password (open server) [supervisord] nodaemon=true user=user logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid ; The rpcinterface:supervisor section must remain in the config file for ; RPC (supervisorctl/web interface) to work. Additional interfaces may be ; added by defining them in separate [rpcinterface:x] sections. [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface ; The supervisorctl section configures how supervisorctl will connect to ; supervisord. configure it match the settings in either the unix_http_server ; or inet_http_server section. [supervisorctl] serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket username=%(ENV_SUPERVISOR_USERNAME)s ; should be same as in [*_http_server] if set password=%(ENV_SUPERVISOR_PASSWORD)s ; should be same as in [*_http_server] if set prompt=supervisor ; cmd line prompt (default "supervisor") history_file=/var/log/supervisor/supervisor.sc_history ; use readline history if available [program:nginx] command=nginx -c "/app/nginx/nginx.conf" autostart=true autorestart=true stdout_logfile=/var/log/nginx/nginx_stdout.log stderr_logfile=/var/log/nginx/nginx_stderr.log [program:fastapi] command=uvicorn app_fast:app --reload --host 127.0.0.1 --port 8000 --log-level info directory=/app/app_fast autostart=true autorestart=true stdout_logfile=/var/log/supervisor/fast_stdout.log stderr_logfile=/var/log/supervisor/fast_stderr.log [program:flask] command=gunicorn app_flask:app --bind 127.0.0.1:5000 --workers 2 directory=/app/app_flask autostart=true autorestart=true stdout_logfile=/var/log/supervisor/flask_stdout.log stderr_logfile=/var/log/supervisor/flask_stderr.log