The deployment was failing because railway.json specified NIXPACKS builder with `pnpm start` as the start command, but the Dockerfile produces a Next.js standalone build that runs with `node server.js`. Changes: - Switch builder from NIXPACKS to DOCKERFILE - Remove startCommand (Dockerfile CMD handles this) - Add NODE_ENV=production to variables The Dockerfile already correctly: - Builds Next.js standalone output - Sets NODE_ENV=production and PORT=3000 - Runs `node server.js` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
421 B
JSON
20 lines
421 B
JSON
{
|
|
"$schema": "https://railway.app/railway.schema.json",
|
|
"build": {
|
|
"builder": "DOCKERFILE",
|
|
"dockerfilePath": "Dockerfile"
|
|
},
|
|
"deploy": {
|
|
"healthcheckPath": "/api/health",
|
|
"healthcheckTimeout": 60,
|
|
"restartPolicyType": "ON_FAILURE",
|
|
"restartPolicyMaxRetries": 5
|
|
},
|
|
"variables": {
|
|
"PORT": "3000",
|
|
"HOST": "0.0.0.0",
|
|
"HOSTNAME": "0.0.0.0",
|
|
"NODE_ENV": "production"
|
|
}
|
|
}
|