Railway
Railway is a PaaS that deploys Docker containers with zero configuration.
One-Click Deploy
Section titled “One-Click Deploy”Or deploy manually from the CLI:
Manual Deploy
Section titled “Manual Deploy”1. Install the Railway CLI
Section titled “1. Install the Railway CLI”npm i -g @railway/clirailway login2. Create a Project
Section titled “2. Create a Project”railway init3. Add a Volume for Persistence
Section titled “3. Add a Volume for Persistence”Railway containers are ephemeral. You need a volume so the SQLite database survives redeploys.
railway volume add --mount /data4. Set Environment Variables
Section titled “4. Set Environment Variables”railway variables set WCP_DB_PATH=/data/sync.dbrailway variables set WCP_CONFIG_PATH=/data/config.jsonrailway variables set WCP_CORS_ORIGINS=https://your-dashboard.example.com5. Deploy
Section titled “5. Deploy”From the WCP repository root:
railway upRailway detects the Dockerfile and builds automatically.
6. Get Your URL
Section titled “6. Get Your URL”railway domainYour WCP instance is live at https://<project>.up.railway.app.
railway.toml
Section titled “railway.toml”For reproducible deploys, add this to the repo root:
[build]builder = "dockerfile"
[deploy]healthcheckPath = "/health"healthcheckTimeout = 30restartPolicyType = "on_failure"restartPolicyMaxRetries = 3Dashboard Deployment
Section titled “Dashboard Deployment”Deploy the React dashboard as a separate Railway service:
- Set the build command to
cd dashboard && npm ci && npm run build - Set the start command to
npx serve dashboard/dist -l 3000 - Set
VITE_API_URLto your WCP API Railway URL