Deploy the full stack (API, worker, frontend, PostgreSQL, Redis) on Render.
- Push this repo to GitHub.
- In Render: New → Blueprint.
- Connect the repository and apply
render.yaml. - Wait for all services to finish building (first deploy takes ~5–10 minutes).
| Service | Type | URL / role |
|---|---|---|
jobqueue-api |
Web (Docker) | https://jobqueue-api.onrender.com |
jobqueue-worker |
Background worker | Consumes Redis queue |
jobqueue-frontend |
Static site | https://jobqueue-frontend.onrender.com |
jobqueue-db |
PostgreSQL | Internal only |
jobqueue-redis |
Redis | Internal only |
After the API is running, sign in to the frontend with:
- Email:
admin@jobqueue.com - Password:
admin123
Set automatically by the blueprint:
| Variable | Service | Purpose |
|---|---|---|
VITE_API_URL |
Frontend | API base URL (baked in at build time) |
FRONTEND_URL |
API | CORS + WebSocket allowed origin |
JWT_SECRET |
API | Auto-generated signing key |
DB_* |
API, Worker | PostgreSQL connection |
REDIS_URL |
API, Worker | Redis connection |
PORT |
API | Set by Render (do not override) |
WebSocket URL is derived automatically: {VITE_API_URL}/ws/jobs.
- Runtime: Docker
- Dockerfile:
jobqueue-api/Dockerfile - Docker context: repository root
- Health check:
/actuator/health
- Runtime: Docker
- Dockerfile:
jobqueue-worker/Dockerfile - Docker context: repository root
- Root directory:
jobqueue-frontend - Build command:
npm install && npm run build - Publish directory:
dist - Environment:
VITE_API_URL=https://<your-api-host>.onrender.com
Add a rewrite rule /* → /index.html for client-side routing.
- Services spin down after ~15 minutes of inactivity (cold start ~30–60s).
- Free PostgreSQL expires after 90 days; upgrade or export data before then.
- Redeploy the frontend after the API URL changes so
VITE_API_URLis correct.
| Issue | Fix |
|---|---|
| CORS errors | Confirm FRONTEND_URL on the API matches the frontend https:// URL exactly |
| Jobs stuck in QUEUED | Check worker logs; verify REDIS_URL is set on worker |
| 502 on API | Check API logs; ensure Postgres and Redis are linked |
| WebSocket fails | API must be deployed; frontend uses {API_URL}/ws/jobs |
Unchanged — use Docker Compose:
docker-compose up -dFrontend dev server proxies to localhost:8080 via Vite (no VITE_API_URL needed locally).