Skip to content

Commit 1e1d160

Browse files
fix: Remove conflicting railway.json buildCommand
1 parent 0385cd3 commit 1e1d160

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

nixpacks.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
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]
55
nixPkgs = ["nodejs_20", "npm-10_x"]
66

77
[phases.install]
8-
# Single install phase - no duplicate copying
8+
# Install dependencies once
99
cmds = [
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
1416
dependsOn = ["install"]
1517
cmds = [
1618
"rm -rf node_modules/.cache",
@@ -22,4 +24,5 @@ cmd = "node dist/servers/railway/minimal.js"
2224

2325
[variables]
2426
NODE_ENV = "production"
25-
PUPPETEER_SKIP_DOWNLOAD = "true"
27+
PUPPETEER_SKIP_DOWNLOAD = "true"
28+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "true"

railway.json

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
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"
@@ -14,23 +13,5 @@
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
}

0 commit comments

Comments
 (0)