-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrailpack.json
More file actions
95 lines (95 loc) · 2.78 KB
/
Copy pathrailpack.json
File metadata and controls
95 lines (95 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"$schema": "https://schema.railpack.com",
"deploy": {
// uv requires git for git-sourced dependencies
"aptPackages": ["git"]
},
"steps": {
"build": {
// TODO right now, all of the variables from the all of the other steps get merged together
"inputs": ["...", { "step": "spa:build", "include": ["public"] }],
"exclude": [
// SPA assets are copied to public/ in the previous step, so we can ignore the web/ folder completely
"web"
]
},
"spa:install": {
"caches": ["pnpm-install"],
"inputs": [
{
"step": "packages:mise"
},
{ "include": ["web"], "local": true }
// "."
],
"commands": [
{
"cmd": "sh -c 'cd web && pnpm install --frozen-lockfile --prefer-offline'"
}
],
"variables": {
// default configuration
"CI": "true",
"NODE_ENV": "production",
"NPM_CONFIG_FUND": "false",
"NPM_CONFIG_PRODUCTION": "false",
"NPM_CONFIG_UPDATE_NOTIFIER": "false",
"PNPM_HOME": "/opt/pnpm"
},
// without this, the output from this step gets merged into the final image
"deployOutputs": []
},
"spa:build": {
"caches": ["node-modules", "vite", "react-router"],
"inputs": [
{
"step": "spa:install"
},
// { "include": ["."], "local": true }
"."
],
"commands": [
{
"cmd": "sh -c 'cd web && pnpm run build'"
},
{ "cmd": "cp -RT web/build/production/client/ public/" }
],
// include build secrets in the build process so sentry properly references the latest git sha for uploading source maps
"secrets": ["*"],
"variables": {
// default configuration
"CI": "true",
"NODE_ENV": "production",
"NPM_CONFIG_FUND": "false",
"NPM_CONFIG_PRODUCTION": "false",
"NPM_CONFIG_UPDATE_NOTIFIER": "false",
"PNPM_HOME": "/opt/pnpm",
"PNPM_STORE": "/opt/pnpm/store"
// additional variables
// "BUILD_COMMIT": "f478048a7c792f39596f1693f4d23e42fdd55812-dirty",
// "VITE_BUILD_COMMIT": "f478048a7c792f39596f1693f4d23e42fdd55812-dirty"
// "BUILD_CREATED_AT": "2026-01-31T19:22:32Z",
// "BUILD_DESCRIPTION": "style: apply consistent formatting and line wrapping in web files"
},
"deployOutputs": []
}
},
"caches": {
"pnpm-install": {
"directory": "/opt/pnpm/store",
"type": "shared"
},
"node-modules": {
"directory": "/app/node_modules/.cache",
"type": "shared"
},
"react-router": {
"directory": "/app/.react-router",
"type": "shared"
},
"vite": {
"directory": "/app/node_modules/.vite",
"type": "shared"
}
}
}