Deploying with Render
Cloud platform with web services, background workers, cron jobs, and managed Postgres/Redis.
PlatformsBeginner
Why
Render is a Heroku alternative with git-push deploys, Docker support, managed databases, and free tier. It auto-deploys on git push with preview deploys for PRs.
Platform-as-a-Service adoption grew 24% in 2024 as teams shift from VM management to git-push deploys. the cloud infrastructure market reached $330B in 2024, growing 22% year-over-year (Synergy Research), and PaaS layers capture the majority of new workloads.
When
Use Render for web services, background workers, and teams migrating from Heroku. Avoid for edge/serverless — use Cloudflare/Vercel.
How
1. Create — render.com → New + → Web Service → connect repo
2. Build — auto-detects or specify build command + start command
3. Env — set environment variables in dashboard
4. Database — New + → PostgreSQL, auto-gets internal DATABASE_URL
5. Worker — New + → Background Worker for queue/cron
6. Custom domain — Settings → Custom Domain
7. Autoscaling — Settings → Autoscaling
Example
# render.yaml — infrastructure as code
services:
- type: web
name: myapp
env: node
buildCommand: npm ci && npm run build
startCommand: npm start
envVars:
- key: DATABASE_URL
fromDatabase: { name: mydb, property: connectionString }
- type: worker
name: myworker
env: node
startCommand: npm run worker
databases:
- name: mydb
plan: starter
Common Problems
- ⚠Free tier sleeps after 15min — first request takes 30s to spin up, upgrade to starter
- ⚠Worker exits silently — Render expects workers to run forever, exiting is treated as crash
- ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical
Best Practices
- ✓Use render.yaml for IaC — version controlled, reproducible environments
- ✓Separate web service and worker — scale independently, worker doesn't need HTTP port
- ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit