Next.js app managed by pnpm restarts because pnpm is missing at run time
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 project builds with pnpm, but the container that runs it had no pnpm, so the start command exits with "pnpm: not found".
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).