[supervisord]
user=root
nodaemon=true
stderr_logfile=/app/logs/error/supervisor.err.log
stdout_logfile=/app/logs/access/supervisor.log

[program:migrator]
directory=/app/backend
command=sh -c "./bin/docker-entrypoint-migrator.sh"
autostart=true
autorestart=unexpected
stdout_logfile=/app/logs/access/migrator.log
stderr_logfile=/app/logs/error/migrator.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
priority=10


[program:space]
directory=/app/space/apps/space
command=sh -c "npx react-router-serve ./build/server/index.js"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/space.log
stderr_logfile=/app/logs/error/space.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
environment=PORT=3002,HOSTNAME=0.0.0.0
priority=15

[program:api]
directory=/app/backend
command=sh -c "./bin/docker-entrypoint-api.sh"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/api.log
stdout_logfile_maxbytes=0
stderr_logfile=/app/logs/error/api.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
environment=PORT=3004,HOSTNAME=0.0.0.0
priority=15


[program:worker]
directory=/app/backend
command=sh -c "./bin/docker-entrypoint-worker.sh"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/worker.log
stdout_logfile_maxbytes=0
stderr_logfile=/app/logs/error/worker.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
priority=20

[program:beat]
directory=/app/backend
command=sh -c "./bin/docker-entrypoint-beat.sh"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/beat.log
stdout_logfile_maxbytes=0
stderr_logfile=/app/logs/error/beat.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
priority=20


[program:live]
command=sh -c "node /app/live/apps/live"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/live.log
stdout_logfile_maxbytes=0
stderr_logfile=/app/logs/error/live.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
environment=PORT=3005,HOSTNAME=0.0.0.0
priority=20


[program:proxy]
directory=/app/proxy
command=sh -c "caddy run --config /app/proxy/Caddyfile"
autostart=true
autorestart=true
stdout_logfile=/app/logs/access/proxy.log
stdout_logfile_maxbytes=0
stderr_logfile=/app/logs/error/proxy.err.log
# stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
priority=20