Skip to content

Latest commit

 

History

History
124 lines (88 loc) · 2.36 KB

File metadata and controls

124 lines (88 loc) · 2.36 KB

Railway Deployment Quick Reference

Quick reference for deploying Yoto Smart Stream to Railway.

Prerequisites

# Install Railway CLI (done automatically in devcontainer)
npm i -g @railway/cli

# Authenticate
railway login

# Link to project
railway link

Deployment Commands

Manual Deployment (from devcontainer)

# Dry run (preview what will happen)
./scripts/deploy.sh staging --dry-run

# Deploy to staging
./scripts/deploy.sh staging

# Deploy to development
./scripts/deploy.sh development

# Production is BLOCKED
./scripts/deploy.sh production  # ❌ Will fail with error

Automated Deployment (via GitHub Actions)

# Push to develop branch → auto-deploys to staging
git checkout develop
git push origin develop

# Monitor deployment
# Go to: https://github.com/earchibald/yoto-smart-stream/actions

Monitoring

# View logs
railway logs -e staging -f

# Check status
railway status -e staging

# Open dashboard
railway open -e staging

Environment Variables

Set via Railway CLI or Dashboard:

# Required
railway variables set YOTO_CLIENT_ID="your_id" -e staging

# Optional
railway variables set DEBUG=true -e staging
railway variables set LOG_LEVEL=DEBUG -e staging
railway variables set PUBLIC_URL="https://your-app.up.railway.app" -e staging

Testing

# Verify deployment setup
python scripts/test_deployment_setup.py

# Check health endpoint
curl https://your-app.up.railway.app/health

Troubleshooting

Railway CLI not found

npm i -g @railway/cli

Not authenticated

railway login

Deployment fails

# Check logs
railway logs -e staging

# Verify tests pass
pytest tests/ -v

Environment Status

Environment Branch Status Auto-Deploy
Production main ⏸️ Disabled ❌ No
Staging develop ✅ Active ✅ Yes
Development manual ✅ Active ❌ No

Key Files

  • railway.toml - Railway configuration
  • scripts/deploy.sh - Deployment script
  • .github/workflows/railway-deploy.yml - CI/CD workflow
  • docs/RAILWAY_DEPLOYMENT.md - Full documentation

Support