[supervisord] nodaemon=true logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid loglevel=info ; supervisorctl endpoint — rotate-secrets uses this to restart stack-app and ; cron-jobs after the emulator snapshot-resume path injects fresh secrets. [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 ; --- PostgreSQL --- [program:postgres] command=/usr/lib/postgresql/16/bin/postgres -D /data/postgres -c listen_addresses=* -c max_connections=500 -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c statement_timeout=0 user=postgres autostart=true autorestart=true priority=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Redis --- [program:redis] command=/usr/bin/redis-server --port 6379 --dir /data/redis --save 60 500 --appendonly yes --appendfsync everysec --requirepass PASSWORD-PLACEHOLDER--oVn8GSD6b9 autostart=true autorestart=true priority=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Inbucket --- [program:inbucket] command=/opt/inbucket/bin/inbucket environment= INBUCKET_SMTP_ADDR="0.0.0.0:2500", INBUCKET_WEB_ADDR="0.0.0.0:9001", INBUCKET_POP3_ADDR="0.0.0.0:1100", INBUCKET_STORAGE_TYPE="file", INBUCKET_STORAGE_PARAMS="path:/data/inbucket", INBUCKET_WEB_UIDIR="/opt/inbucket/ui" autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- ClickHouse --- [program:clickhouse] command=/usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- MinIO --- [program:minio] command=/usr/local/bin/minio server /data/minio --address :9090 --console-address :9091 environment= MINIO_ROOT_USER="s3mockroot", MINIO_ROOT_PASSWORD="s3mockroot" autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Svix --- [program:svix] command=/usr/local/bin/svix-server environment= WAIT_FOR="true", SVIX_DB_DSN="postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@127.0.0.1:5432/svix", SVIX_REDIS_DSN="redis://:PASSWORD-PLACEHOLDER--oVn8GSD6b9@127.0.0.1:6379", SVIX_CACHE_TYPE="memory", SVIX_JWT_SECRET="secret", SVIX_LOG_LEVEL="info", SVIX_QUEUE_TYPE="redis" autostart=true autorestart=true priority=30 startsecs=5 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- QStash --- [program:qstash] command=/usr/local/bin/qstash dev environment=HOST_ON_HOST="host.docker.internal" autostart=true autorestart=true priority=30 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Stripe mock --- [program:stripe-mock] command=/usr/local/bin/stripe-mock -port 12111 autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Freestyle mock (JS execution for email rendering) --- [program:freestyle-mock] command=/usr/local/bin/node /app/freestyle-mock/server.mjs environment=NODE_PATH="/app/freestyle-mock/node_modules",PORT="8180" autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Mock OAuth server --- [program:mock-oauth] command=/usr/local/bin/node /app/mock-oauth-server/index.cjs autostart=true autorestart=true priority=20 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Post-startup init --- [program:init-services] command=/init-services.sh autostart=true autorestart=false startsecs=0 exitcodes=0 priority=50 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Cron jobs (email queue, external DB sync) --- [program:cron-jobs] command=/run-cron-jobs.sh autostart=true autorestart=true startsecs=0 priority=70 stopasgroup=true killasgroup=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 ; --- Hexclave backend + dashboard --- [program:stack-app] command=/start-app.sh autostart=true autorestart=unexpected startsecs=0 priority=60 ; The wrapper script spawns Node backends as background children. On ; supervisor restart we MUST kill the whole process group, otherwise the ; old Node servers keep their port bindings and the new ones fail with ; EADDRINUSE — breaking the snapshot-resume rotation flow. stopasgroup=true killasgroup=true stopwaitsecs=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0