mcpField
D
deploy-railway

deploy-railway

github.com/dralgorhythmCloud & DevOps12853 installsUpdated 14w ago
Repository

About deploy-railway

A skill for deploying applications to Railway using its CLI and configuration files. It covers project setup, build and deployment options, environment variables, databases, domains, logs, and preview environments.

Key features

  1. 01Railway CLI setup and deployment
  2. 02Build configuration with railway.json
  3. 03Environment variable management
  4. 04PostgreSQL provisioning
  5. 05Domain and log commands
  6. 06Preview environment guidance

Use cases

  1. 01Deploying an application to Railway
  2. 02Setting production environment variables
  3. 03Adding a PostgreSQL database
  4. 04Reviewing deployment logs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill deploy-railway

After installing, type/deploy-railwayin Claude Code to confirm it loaded.

Details

From the project README

Deploy to Railway

Why Railway?

  • Zero config deployments
  • Automatic HTTPS
  • Built-in databases
  • Environment management
  • Preview environments

Quick Start

# Install CLI
npm install -g @railway/cli

# Login
railway login

# Initialize project
railway init

# Deploy
railway up

Configuration

railway.json
{
  "build": {
    "builder": "NIXPACKS"
  },
  "deploy": {
    "startCommand": "npm start",
    "healthcheckPath": "/health",
    "restartPolicyType": "ON_FAILURE"
  }
}
Environment Variables
# Set variable
railway variables set DATABASE_URL=postgres://...

# Set from file
railway variables set < .env.production

Database Setup

# Add PostgreSQL
railway add --database postgres

# Get connection URL
railway variables get DATABASE_URL

Deployment Workflow

1. Connect Repo
railway link
2. Configure Build

Railway auto-detects most frameworks. Override with:

# Nixpacks (default)
railway up

# Dockerfile
railway up --dockerfile
3. Set Domain
railway domain

Best Practices

  1. Use Preview Environments: Test PRs before merge
  2. Separate Databases: Different DB per environment
  3. Use Variables: Never hardcode secrets
  4. Health Checks: Enable for reliability
  5. Logs: Use railway logs for debugging

Common Commands

# View logs
railway logs

# Open dashboard
railway open

# Run command in environment
railway run npm run migrate

# List services
railway status

Comments

Markdown supported