fix: use standalone server for Next.js in Docker

Replace 'next start' with 'node server.js' to properly utilize
Next.js standalone output mode in Docker deployments.

Changes:
- Update supervisord.conf to run standalone server
- Update supervisord.single.conf to run standalone server
- Update package.json start script for consistency

This eliminates the startup warning and follows Next.js best
practices for optimized Docker deployments.
This commit is contained in:
LUIS NOVO 2026-01-14 22:03:15 -03:00
parent f92c42a5a4
commit 50157c3c79
3 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -p ${PORT:-8502}",
"start": "node .next/standalone/server.js",
"lint": "next lint"
},
"dependencies": {

View file

@ -26,7 +26,7 @@ autostart=true
startsecs=3
[program:frontend]
command=bash -c "/app/scripts/wait-for-api.sh && npm run start"
command=bash -c "/app/scripts/wait-for-api.sh && node server.js"
directory=/app/frontend
environment=NODE_ENV="production",PORT="8502"
passenv=API_URL,NEXT_PUBLIC_API_URL,INTERNAL_API_URL

View file

@ -38,7 +38,7 @@ autostart=true
startsecs=3
[program:frontend]
command=bash -c "/app/scripts/wait-for-api.sh && npm run start"
command=bash -c "/app/scripts/wait-for-api.sh && node server.js"
directory=/app/frontend
environment=NODE_ENV="production",PORT="8502"
passenv=API_URL,NEXT_PUBLIC_API_URL,INTERNAL_API_URL