[supervisord] nodaemon=true user=root logfile=/dev/stdout logfile_maxbytes=0 pidfile=/var/run/supervisord.pid [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 [program:server-api] command=node server-api.js directory=/app autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 user=nginx ; Run as nginx user, ensure this user has write access to /data if API needs it, or adjust DATA_FILE_PATH ownership. ; For DATA_FILE_PATH, it's better to set it via an environment variable in supervisord or Dockerfile for flexibility. environment=PORT="3000",DATA_FILE_PATH="/data/weight-tracker-data.json" ;[program:s3-backup] ;command=node backup-s3.js ;directory=/app ;environment=DATA_PATH="/data/weight-tracker-data.json",S3_ENDPOINT="%(ENV_S3_ENDPOINT)s",S3_BUCKET="%(ENV_S3_BUCKET)s",S3_ACCESS_KEY="%(ENV_S3_ACCESS_KEY)s",S3_SECRET_KEY="%(ENV_S3_SECRET_KEY)s",BACKUP_SCHEDULE="%(ENV_BACKUP_SCHEDULE)s",BACKUP_RETENTION="%(ENV_BACKUP_RETENTION)s" ;autostart=true ;autorestart=true ;stdout_logfile=/dev/stdout ;stdout_logfile_maxbytes=0 ;stderr_logfile=/dev/stderr ;stderr_logfile_maxbytes=0