2025-10-04 08:01:50 +01:00
|
|
|
{
|
|
|
|
|
"$schema": "https://railway.com/railway.schema.json",
|
|
|
|
|
"build": {
|
2026-03-10 22:11:47 +01:00
|
|
|
"builder": "RAILPACK",
|
|
|
|
|
"buildCommand": "sh -lc 'case \"${SERVICE_TARGET:-api}\" in api) pnpm -r --filter @cio/api... build ;; dashboard) NODE_OPTIONS=\"--max-old-space-size=3072\" pnpm -r --filter @cio/dashboard... build ;; *) echo \"Unsupported SERVICE_TARGET: ${SERVICE_TARGET:-api}\" >&2; exit 1 ;; esac'"
|
2025-10-04 08:01:50 +01:00
|
|
|
},
|
|
|
|
|
"deploy": {
|
2026-03-10 22:11:47 +01:00
|
|
|
"preDeployCommand": "sh -lc 'if [ \"${SERVICE_TARGET:-api}\" = \"api\" ]; then pnpm --filter @cio/db db:setup; else echo \"Skipping db setup for ${SERVICE_TARGET:-api}\"; fi'",
|
|
|
|
|
"startCommand": "sh -lc 'case \"${SERVICE_TARGET:-api}\" in api) exec pnpm --filter @cio/api start ;; dashboard) exec pnpm --filter @cio/dashboard start ;; *) echo \"Unsupported SERVICE_TARGET: ${SERVICE_TARGET:-api}\" >&2; exit 1 ;; esac'",
|
2025-10-04 08:01:50 +01:00
|
|
|
"healthcheckPath": "/",
|
|
|
|
|
"healthcheckTimeout": 100,
|
2026-03-10 22:11:47 +01:00
|
|
|
"restartPolicyType": "ALWAYS"
|
2025-10-04 08:01:50 +01:00
|
|
|
}
|
|
|
|
|
}
|