Update Railway config and health response

This commit is contained in:
Alexa Amundson
2025-11-21 13:46:18 -06:00
parent 3faddb72e6
commit c6d1e63e17
2 changed files with 11 additions and 9 deletions

View File

@@ -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"
} }
} }

View File

@@ -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