Deployment Guide (Render)
Automatic Deployment
BacMR is configured for "Infra-as-Code" via render.yaml.
- Trigger: Pushing to the main branch triggers an automatic rebuild.
Manual Steps for New Env
- Create Service: Connect your GitHub repo to Render.
- Select Type: Web Service.
- Connect Blueprint: Render should automatically detect
render.yaml. - Environment Variables:
- Copy keys from your local
.env. - Ensure
ENV=prodis set. - Ensure
CORS_ALLOWED_ORIGINSincludes your frontend URL.
Port Management
The app listens on $PORT (defaulting to 8000 locally). Render injects the correct port automatically.
Log Monitoring
Use the "Logs" tab in the Render dashboard to monitor: - Startup errors (missing dependencies). - Runtime errors (OpenAI rate limits). - Token deduction failures.