Update Railway configuration to modern schema

Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-21 19:45:39 +00:00
parent 91537bdfc0
commit 1f6970813f
2 changed files with 22 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ Visit http://localhost:3000.
npm run build npm run build
npm start npm start
``` ```
The start command serves the production build on port 8080. The start command serves the production build. By default, it uses port 3000, but you can set the `PORT` environment variable to use a different port (e.g., `PORT=8080 npm start`).
## Key routes ## Key routes
- `/` docs homepage - `/` docs homepage
@@ -29,11 +29,16 @@ The start command serves the production build on port 8080.
- `/api/info` service metadata - `/api/info` service metadata
## Railway deployment ## Railway deployment
- Port: 8080
- Healthcheck path: `/api/health` This project is configured for Railway deployment using `railway.json`. The configuration includes:
- Build command: `npm install && npm run build`
- Start command: `npm start` - **Port**: Railway will automatically set the `PORT` environment variable (typically 8080)
- Required env vars: see `.env.example` - **Healthcheck path**: `/api/health`
- **Build command**: `npm install && npm run build`
- **Start command**: `npm start`
- **Required env vars**: see `.env.example`
The configuration uses Railway's modern schema with automatic restart on failure and health monitoring.
## Environment variables ## Environment variables
Copy `.env.example` and adjust values as needed for your environment. Service URLs default to the production `blackroad.systems` domains. Copy `.env.example` and adjust values as needed for your environment. Service URLs default to the production `blackroad.systems` domains.

View File

@@ -1,10 +1,14 @@
{ {
"build": "npm install && npm run build", "$schema": "https://railway.com/railway.schema.json",
"start": "npm start", "build": {
"service": { "builder": "NIXPACKS",
"port": 8080, "buildCommand": "npm install && npm run build"
"healthcheck": { },
"path": "/api/health" "deploy": {
} "startCommand": "npm start",
"healthcheckPath": "/api/health",
"healthcheckTimeout": 100,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
} }
} }