[supervisord] nodaemon=true user=root logfile=/dev/null logfile_maxbytes=0 pidfile=/var/run/supervisord.pid [unix_http_server] file=/var/run/supervisor.sock chmod=0700 [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///var/run/supervisor.sock # ------------------------------------------------------------------------------ # Applications # ------------------------------------------------------------------------------ [program:backend] command=/cargo-target/debug/backend directory=/app autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:worker] command=/cargo-target/debug/worker directory=/app autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:webdav] command=/cargo-target/debug/webdav directory=/app autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 # ------------------------------------------------------------------------------ # Watcher # ------------------------------------------------------------------------------ [program:watcher] # 1. Check syntax # 2. Build binaries # 3. Restart services via supervisorctl command=cargo watch -w src -x check -x "build --bin backend --bin worker --bin webdav" -s "supervisorctl restart backend worker webdav" directory=/app autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0