Update Railway config and health response
This commit is contained in:
16
railway.json
16
railway.json
@@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
"build": "npm install && npm run build",
|
"$schema": "https://railway.app/railway.schema.json",
|
||||||
"start": "npm start",
|
"build": {
|
||||||
"service": {
|
"builder": "NIXPACKS",
|
||||||
"port": 8080,
|
"buildCommand": "npm install && npm run build",
|
||||||
"healthcheck": {
|
"startCommand": "npm run start"
|
||||||
"path": "/api/health"
|
},
|
||||||
}
|
"deploy": {
|
||||||
|
"healthcheckPath": "/api/health",
|
||||||
|
"restartPolicyType": "ON_FAILURE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ export async function GET() {
|
|||||||
const healthy = services.every((service) => service.status === 'healthy' || service.status === 'not_configured');
|
const healthy = services.every((service) => service.status === 'healthy' || service.status === 'not_configured');
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
|
status: 'ok',
|
||||||
|
service: 'prism-console',
|
||||||
ok: healthy,
|
ok: healthy,
|
||||||
service: SERVICE_ID,
|
|
||||||
ts: new Date().toISOString(),
|
ts: new Date().toISOString(),
|
||||||
status: healthy ? 'ok' : 'degraded',
|
|
||||||
environment: serverConfig.environment,
|
environment: serverConfig.environment,
|
||||||
version: process.env.npm_package_version ?? 'unknown',
|
version: process.env.npm_package_version ?? 'unknown',
|
||||||
services
|
services
|
||||||
|
|||||||
Reference in New Issue
Block a user