File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed
Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 11# Nixpacks configuration for Railway deployment
2- # Fixed to prevent node_modules cache conflicts
2+ # Explicitly control all build phases to prevent duplicate operations
33
44[phases .setup ]
55nixPkgs = [" nodejs_20" , " npm-10_x" ]
66
77[phases .install ]
8- # Single install phase - no duplicate copying
8+ # Install dependencies once
99cmds = [
10+ " rm -rf node_modules node_modules/.cache" ,
1011 " npm ci --legacy-peer-deps"
1112]
1213
1314[phases .build ]
15+ # Only build, don't reinstall
1416dependsOn = [" install" ]
1517cmds = [
1618 " rm -rf node_modules/.cache" ,
@@ -22,4 +24,5 @@ cmd = "node dist/servers/railway/minimal.js"
2224
2325[variables ]
2426NODE_ENV = " production"
25- PUPPETEER_SKIP_DOWNLOAD = " true"
27+ PUPPETEER_SKIP_DOWNLOAD = " true"
28+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = " true"
Original file line number Diff line number Diff line change 22 "$schema" : " https://railway.app/railway.schema.json" ,
33 "build" : {
44 "builder" : " NIXPACKS" ,
5- "buildCommand" : " PUPPETEER_SKIP_DOWNLOAD=true npm ci --omit=dev && npm run build" ,
65 "watchPatterns" : [
76 " src/**" ,
87 " package.json"
1413 "restartPolicyMaxRetries" : 3 ,
1514 "healthcheckPath" : " /health" ,
1615 "healthcheckTimeout" : 30
17- },
18- "environments" : {
19- "production" : {
20- "build" : {
21- "buildCommand" : " npm ci && npm run build"
22- },
23- "deploy" : {
24- "startCommand" : " NODE_ENV=production npm start"
25- }
26- },
27- "staging" : {
28- "build" : {
29- "buildCommand" : " npm ci && npm run build"
30- },
31- "deploy" : {
32- "startCommand" : " NODE_ENV=staging npm start"
33- }
34- }
3516 }
3617}
You can’t perform that action at this time.
0 commit comments