mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 03:19:59 +00:00
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:
parent
f92c42a5a4
commit
50157c3c79
3 changed files with 3 additions and 3 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue