DEPLOYMENT.md•2.66 kB
# Deployment Checklist for Finarrator
## MCP Server Deployment on Render
### Pre-Deployment Checklist
- [ ] All code is committed to GitHub
- [ ] `.gitignore` is properly configured
- [ ] `.env` contains all required environment variables
- [ ] `package.json` has correct scripts (start, dev)
- [ ] `render.yaml` is configured
- [ ] `credentials.json` is in the root directory
- [ ] All dependencies are listed in `package.json`
- [ ] Server runs locally with `npm run dev`
### Render Setup
1. [ ] Create Render account
2. [ ] Connect GitHub repository to Render
3. [ ] Create new Web Service
4. [ ] Configure:
- Service Name: `financial-mcp-server`
- Environment: `Node`
- Build Command: `npm install`
- Start Command: `npm start`
- Region: Select closest region
5. [ ] Add Environment Variables:
- PORT=10000
- NODE_ENV=production
- CREDENTIALS_FILE=./credentials.json
6. [ ] Deploy and wait for success ✓
7. [ ] Test health check: `GET https://your-service.onrender.com/`
8. [ ] Test login endpoint: `POST https://your-service.onrender.com/api/login`
### Post-Deployment
- [ ] Verify service is running
- [ ] Check logs for errors
- [ ] Test API endpoints
- [ ] Update frontend with new backend URL
- [ ] Monitor service health
## Important Notes
### File Size Limits
- Render free tier: 512 MB RAM
- MCP Server is lightweight, should have no issues
### Cold Starts
- Free tier services spin down after 15 minutes of inactivity
- First request after inactivity may take 20-30 seconds
- Use paid plan for always-on service
### Credentials Management
- `credentials.json` contains mock user credentials
- This is safe to commit (mock data only)
- For real credentials, use Render secrets
### Updates
- Push changes to GitHub main branch
- Render auto-deploys (usually within 1-2 minutes)
## Environment Variables
### Development (.env)
```
PORT=10000
NODE_ENV=development
CREDENTIALS_FILE=./credentials.json
```
### Production (Render Dashboard)
```
PORT=10000
NODE_ENV=production
CREDENTIALS_FILE=./credentials.json
```
## Troubleshooting Commands
### Test locally before deployment:
```bash
npm install
npm run dev
```
### Check if server responds:
```bash
curl http://localhost:10000
```
### Test login endpoint:
```bash
curl -X POST http://localhost:10000/api/login \
-H "Content-Type: application/json" \
-d '{"mobile":"1010101010","password":"pass123"}'
```
## Render Dashboard Tips
- Monitor: View real-time logs and metrics
- Restart: Click "Manual Deploy" to restart service
- Logs: Check logs if deployment fails
- Metrics: Monitor CPU and memory usage
- Alerts: Set up email alerts for errors