| title | Deploying to Render |
|---|---|
| description | Deploy Procella to Render using a render.yaml Blueprint with a Docker web service, Postgres database, and environment groups. |
import { Aside } from '@astrojs/starlight/components';
Render Blueprints define your entire stack (web service + Postgres) as a single render.yaml file committed to your repo. Render handles TLS, health checks, and zero-downtime deploys automatically.
Official docs: render.com/docs/blueprint-spec
A ready-to-use render.yaml is included in the repo root:
# render.yaml — Procella Blueprint
databases:
- name: procella-db
plan: basic-1gb # basic-256mb | basic-1gb | pro-4gb ...
region: oregon # match your web service region
databaseName: procella
user: procella
postgresMajorVersion: 17
services:
- name: procella
type: web
runtime: docker # use your Dockerfile
region: oregon
plan: starter # starter | standard | pro
dockerfilePath: ./Dockerfile
# dockerContext: . # defaults to repo root
# Non-sensitive config
envVars:
- key: PROCELLA_LISTEN_ADDR
value: ":10000" # Render assigns ~10000, not 9090
- key: PROCELLA_AUTH_MODE
value: dev # or descope
- key: PROCELLA_BLOB_BACKEND
value: s3
- key: PROCELLA_BLOB_S3_REGION
value: us-east-1
- key: PROCELLA_BLOB_S3_BUCKET
value: your-bucket-name # REQUIRED when using S3 backend
- key: PROCELLA_BLOB_S3_ENDPOINT
value: https://s3.amazonaws.com # change for R2, MinIO, etc.
# Wire DATABASE_URL from the Blueprint Postgres instance
- key: PROCELLA_DATABASE_URL
fromDatabase:
name: procella-db
property: connectionString
# Secrets live on the service: Render rejects `sync: false` inside an
# envVarGroup, so a grouped secret never prompts and never resolves.
- key: PROCELLA_DEV_AUTH_TOKEN
sync: false
- key: PROCELLA_ENCRYPTION_KEY # openssl rand -hex 32
sync: false
- key: PROCELLA_TICKET_SIGNING_KEY # openssl rand -hex 32 (32+ chars)
sync: false
- key: PROCELLA_DESCOPE_PROJECT_ID
sync: false
- key: PROCELLA_DESCOPE_MANAGEMENT_KEY
sync: false
- key: AWS_ACCESS_KEY_ID
sync: false
- key: AWS_SECRET_ACCESS_KEY
sync: false
# Apply migrations before the new image serves traffic. The image ships its
# migrations at /migrations and has no shell, so this is a single exec.
preDeployCommand: "/procella --migrate /migrations"
# Health check: Render marks deploy failed unless the app returns 200.
# /healthz verifies that the schema is current, so an unmigrated database
# blocks the deploy instead of serving 500s on every stack operation.
healthCheckPath: /healthz
# Auto-deploy on every push to the linked branch
autoDeploy: trueThe databases block provisions a fully managed Render Postgres. Available plans:
| Plan | RAM | Notes |
|---|---|---|
free |
256 MB | Dev/testing only, 90-day expiry |
basic-256mb |
256 MB | Smallest paid tier |
basic-1gb |
1 GB | Good for small production |
pro-4gb |
4 GB | Includes PITR, read replicas |
Render Postgres v17 is available. Use postgresMajorVersion: 17 to pin it.
The connectionString property auto-generates as:
postgresql://user:password@host:5432/procella?sslmode=require
Set sync: false env vars in the Render Dashboard under Environment → Environment Variables before the first Blueprint sync. After that, values persist across resyncs. Declare them on the service, not in an envVarGroup; the Blueprint spec rejects sync: false there.
Alternatively, use the Render CLI:
render env:set PROCELLA_ENCRYPTION_KEY="$(openssl rand -hex 32)" --service procellaPROCELLA_ENCRYPTION_KEY and PROCELLA_TICKET_SIGNING_KEY are both mandatory: the server exits at startup if either is unset.
- Push
render.yamlto your GitHub/GitLab repo. - In the Render Dashboard: New → Blueprint → connect your repo.
- Fill in
sync: falsesecret values. - Click Apply — Render provisions Postgres, then deploys your Docker image.
On subsequent pushes, Render auto-deploys (if autoDeploy: true).
services:
- name: procella
plan: standard # upgrade plan for more CPU/RAM
scaling:
minInstances: 1
maxInstances: 5
targetMemoryPercent: 80
targetCPUPercent: 70- Render builds your
Dockerfileon its own build machines. Thebun build --compileoutput produces a standalone binary in a distroless container — no shell, no package manager, no runtime installation needed. - Render automatically terminates TLS and routes HTTPS on port 443 to your container's
internal_port(Render uses thePORTenv var; ensure your app binds to0.0.0.0:$PORTor setPROCELLA_LISTEN_ADDR=:10000— Render assigns a port around 10000). - Health check failures block the deploy and trigger a rollback.