From 50157c3c79c0b1915269441cb9cecc681aaf3c4e Mon Sep 17 00:00:00 2001 From: LUIS NOVO Date: Wed, 14 Jan 2026 22:03:15 -0300 Subject: [PATCH] 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. --- frontend/package.json | 2 +- supervisord.conf | 2 +- supervisord.single.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 0de5611..06e3be3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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": { diff --git a/supervisord.conf b/supervisord.conf index 14bbb64..6bc872b 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -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 diff --git a/supervisord.single.conf b/supervisord.single.conf index 345d37b..786dbbf 100644 --- a/supervisord.single.conf +++ b/supervisord.single.conf @@ -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