From atum-workflows
Railway deployment pattern library — deploy Node / Python / Ruby / Go / Rust / PHP / Docker apps to Railway's infrastructure. Covers railway.json config, environment variables and shared env groups, database provisioning (Postgres, MySQL, Redis, MongoDB), custom domains and SSL, volumes for persistent storage, cron jobs, private networking between services, monorepo deployment with service-level configs, and GitHub integration for auto-deploys. Use when deploying a backend service (API, worker, or full-stack app) to Railway, provisioning databases, configuring environment groups, setting up private networking between services, or migrating from Heroku. Differentiates from deploy-vercel (frontend-focused) by targeting backend services and long-running processes. Railway is the best choice for Postgres-backed backends that don't fit a serverless model.
npx claudepluginhub arnwaldn/atum-plugins-collection --plugin atum-workflowsThis skill uses the workspace's default tool permissions.
Railway est une PaaS moderne idéale pour les backends Node/Python/Go/Ruby/PHP avec Postgres/Redis, qui ne rentrent pas dans un modèle serverless pur. Successor spirituel d'Heroku avec un UX modernisé.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Railway est une PaaS moderne idéale pour les backends Node/Python/Go/Ruby/PHP avec Postgres/Redis, qui ne rentrent pas dans un modèle serverless pur. Successor spirituel d'Heroku avec un UX modernisé.
# Install CLI
npm install -g @railway/cli
# Login
railway login
# Link un projet local à un Railway project
cd my-backend
railway init
# Choisir "Empty Project" ou template
# Deploy
railway up
railway.json{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm run build"
},
"deploy": {
"startCommand": "npm run start",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Railway utilise Nixpacks par défaut pour détecter le stack et builder — Node, Python, Ruby, Go, Rust, PHP sont auto-détectés.
Dans Railway, un Project contient plusieurs Services. Les services d'un même project peuvent communiquer via Private Network (DNS interne).
my-project/
├── api (Node.js service)
├── worker (Node.js service, background jobs)
├── postgres (database)
└── redis (cache)
Chaque service a un DNS interne : postgres.railway.internal, redis.railway.internal.
Depuis api :
const pg = new Pool({
connectionString: process.env.DATABASE_URL, // auto-injected
// Via Railway shared env group, DATABASE_URL pointe vers postgres.railway.internal
})
# Créer un service Postgres depuis le CLI
railway add postgres
# L'URL est auto-injectée dans les services qui partagent la reference variable
Railway Postgres inclut :
railway add redis
railway add mysql
railway add mongodb
Tous suivent le même pattern — auto-provisioning + DNS interne + connection string injectée.
# Variables du service courant
railway variables set STRIPE_SECRET_KEY=sk_live_xxx
# Liste
railway variables
# Env groups — partager des vars entre services
railway variables --service api
Pattern shared env group :
${{shared.STRIPE_SECRET_KEY}}DATABASE_URL=${{Postgres.DATABASE_URL}}
REDIS_URL=${{Redis.REDIS_URL}}
API_URL=${{api.RAILWAY_PUBLIC_DOMAIN}}
// railway.json pour un service cron
{
"deploy": {
"startCommand": "node scripts/daily-job.js",
"cronSchedule": "0 9 * * *"
}
}
Ou créer un service dédié "cron" qui wake up, exécute, et exit.
# Créer un volume attaché à un service
railway volume add --mount-path /data
Utile pour :
Limitation : un volume ne peut être attaché qu'à un seul service à la fois. Pour du shared storage, passer par R2/S3/Blob.
# Via UI : Service → Settings → Networking → Custom Domain
# Configurer un CNAME vers <project>.up.railway.app
SSL automatique via Let's Encrypt.
Dans un monorepo (pnpm / turborepo) :
// railway.json à la racine du monorepo
{
"build": {
"builder": "NIXPACKS",
"buildCommand": "pnpm install && pnpm --filter=@app/api build",
"watchPatterns": ["apps/api/**", "packages/**"]
},
"deploy": {
"startCommand": "pnpm --filter=@app/api start"
}
}
Ou utiliser le setting Root Directory dans le service pour pointer vers apps/api/.
main pour prod, staging pour staging)# Liste des deployments
railway status
# Rollback vers un deployment précédent via UI :
# Deployments → ... → Redeploy
Pour un projet client : monitorer le dashboard "Usage" pour anticiper les coûts.
maindeploy-vercel (dans ce plugin)deploy-cloudflare (dans ce plugin)deploy-fly (dans ce plugin)deploy-docker-registries (dans ce plugin)