Files
prompts.chat/docker/supervisord.conf
T
Mariano Silva 9156cece88 Fix Docker bootstrap: supervisord socket not configured
supervisord.conf was missing [unix_http_server], [supervisorctl], and
[rpcinterface:supervisor] sections, so the Unix socket was never created.
This caused the readiness check to always fail and the container to exit
with "Supervisord failed to start".

- Add missing supervisord socket and RPC configuration sections
- Improve bootstrap readiness check to verify both process and socket
- Add early exit if supervisord process dies unexpectedly
- Simplify supervisorctl calls (config path no longer needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:38:42 -03:00

39 lines
1.0 KiB
Plaintext

[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
[program:postgresql]
command=/usr/lib/postgresql/15/bin/postgres -D /data/postgres
user=postgres
autostart=true
autorestart=true
priority=10
stdout_logfile=/var/log/supervisor/postgresql.log
stderr_logfile=/var/log/supervisor/postgresql-error.log
[program:nextjs]
command=node /data/app/.next/standalone/server.js
directory=/data/app
user=root
autostart=false
autorestart=true
priority=20
startsecs=10
startretries=3
environment=NODE_ENV="production",PORT="%(ENV_PORT)s",HOSTNAME="0.0.0.0",DATABASE_URL="%(ENV_DATABASE_URL)s",AUTH_SECRET="%(ENV_AUTH_SECRET)s"
stdout_logfile=/var/log/supervisor/nextjs.log
stderr_logfile=/var/log/supervisor/nextjs-error.log