RAILWAY NEXT STEPS
Documentation management API with real-time MongoDB sync
🚂 Railway: Deploy via CLI (Token-Based)
What You Have
✅ Railway project "Docs Api" created
✅ RAILWAY_DOCS_TOKEN configured in .env.local
✅ Project ID: 5bac6b27-44c1-47b9-a14b-f7235ae2ca87
No need to connect GitHub! Deploy directly via CLI using your token.
Deploy Now (One Command)
cd /Users/fguijarro/developer/repos/editor
./deployment/deploy-docs-api.sh
This will:
- Load
RAILWAY_DOCS_TOKENfrom.env.local - Build backend-docs-api
- Upload to Railway
- Create the service automatically
- Start the application
Expected output:
📚 Backend Docs API Railway Deployment
🔐 Loading tokens from .env.local
🔧 Setting up docs-api railway config...
⏳ Deploying backend-docs-api...
✅ Backend Docs API Deployment Triggered!
Before Running: Verify .env.local
Make sure you have:
RAILWAY_DOCS_TOKEN=<your-token>
RAILWAY_PROJECTID_DOCS=5bac6b27-44c1-47b9-a14b-f7235ae2ca87
SYSTEM_TOKEN=<your-system-token>
MONGODB_CONNECTION_STRING_TEST_MODULES=<your-mongodb-uri>
After Deployment
1. Add Environment Variables in Railway Dashboard
Go to your project → Click the new service → Variables tab:
NODE_ENV=production
JWT_SECRET=<COPY_FROM_BACKEND_API>
SYSTEM_TOKEN=<from-your-env-local>
MONGODB_CONNECTION_STRING_TEST_MODULES=<from-your-env-local>
ALLOWED_ORIGINS=https://gograb.space,http://localhost:5010
Important: Copy JWT_SECRET from your backend-api Railway variables (must match!).
2. Generate Domain
Settings → Networking → "Generate Domain"
3. Configure Health Check
Settings → Health Check:
- Path:
/docs-api/health - Timeout:
30
4. Test Deployment
curl https://your-domain.railway.app/docs-api/health
5. Initial Data Sync
export DOCS_API_URL=https://your-domain.railway.app/docs-api
export SYSTEM_TOKEN=<your-token>
yarn docs:sync
That's It!
Just run: ./deployment/deploy-docs-api.sh
The token-based deployment will handle everything automatically!
See full guide: docs/english/Backend-Docs-Api/RAILWAY-SERVICE-SETUP.md