[supervisord]
nodaemon=true
logfile=/dev/null
pidfile=/var/run/supervisord.pid
user=root
loglevel=info

[program:backend]
command=/bin/sh /app/start-backend.sh
directory=/app
autostart=true
autorestart=true
startsecs=2
startretries=20
# 关键：把 backend 日志打到 docker logs，而不是只写文件
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
# 不在此写 environment=，完整继承 compose/container 环境变量

[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
