Add Railway deployment config and workflow
railway.toml with NIXPACKS build + /v1/health check. deploy-railway.yml triggers on push to main and manual dispatch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
.github/workflows/deploy-railway.yml
vendored
Normal file
23
.github/workflows/deploy-railway.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Deploy to Railway
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Deploy to Railway
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Railway CLI
|
||||||
|
run: npm install -g @railway/cli
|
||||||
|
|
||||||
|
- name: Deploy to Railway
|
||||||
|
run: railway up --detach
|
||||||
|
env:
|
||||||
|
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
||||||
|
RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}
|
||||||
10
railway.toml
Normal file
10
railway.toml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[build]
|
||||||
|
builder = "NIXPACKS"
|
||||||
|
buildCommand = "npm ci && npm run build"
|
||||||
|
|
||||||
|
[deploy]
|
||||||
|
startCommand = "npm start"
|
||||||
|
healthcheckPath = "/v1/health"
|
||||||
|
healthcheckTimeout = 300
|
||||||
|
restartPolicyType = "ON_FAILURE"
|
||||||
|
restartPolicyMaxRetries = 10
|
||||||
Reference in New Issue
Block a user