; Supervisor alternative to PM2 — use ONE of the two for this app, never both (they would fight over the port).
;
;   sudo cp deploy/supervisor-kapitano-admin.conf /etc/supervisor/conf.d/kapitano-admin.conf
;   (edit directory, user and the node path below)
;   sudo supervisorctl reread && sudo supervisorctl update
;   sudo supervisorctl status kapitano-admin
;
; Supervisor itself starts at boot (systemd `supervisor` service: `sudo systemctl enable supervisor`).
[program:kapitano-admin]
directory=/var/www/kapitano-admin
command=/usr/bin/node node_modules/next/dist/bin/next start
user=www-data
environment=NODE_ENV="production",PORT="3000",HOSTNAME="0.0.0.0"
autostart=true
autorestart=true
startsecs=20
startretries=10
stopsignal=TERM
stopwaitsecs=10
stopasgroup=true
killasgroup=true
stdout_logfile=/var/log/kapitano-admin/out.log
stderr_logfile=/var/log/kapitano-admin/error.log
stdout_logfile_maxbytes=20MB
stdout_logfile_backups=5
stderr_logfile_maxbytes=20MB
stderr_logfile_backups=5
