Next.js app restarts because its production build is missing
The application started but did not answer on any port it publishes. The deploy log has the per-port result; a worker or queue-only app can ignore this. | The application is restarting, not running. Docker reports app (Restarting (1) 17 seconds ago). Nothing answered on any published port because the process keeps exiting. Read the container output with container_service_logs; the reason it exits is there.
Why it happens
The container starts Next.js on port 3000, but no production build is present in the .next directory. The process exits immediately and Docker restarts it, so the health check cannot connect. This can happen when the build runs in a different workspace or the .next output is not included in the runtime container.
What the log looks like
Health check: http://[ip]:3000/ did not answer — Failed to connect to [ip] port 3000app-1 | ✓ Ready in 157msapp-1 | Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server.app-1 | [panelalpha] start: serveapp-1 | Error: Could not find a production build in the '.next' directory.app-1 | Docker reports app (Restarting (1) 7 seconds ago).