-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
35 lines (33 loc) · 1.33 KB
/
render.yaml
File metadata and controls
35 lines (33 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
services:
- type: kv
name: trdrhub-redis
plan: free # Use 'starter' or 'standard' for production
region: oregon
maxmemoryPolicy: allkeys-lru
- type: web
name: trdrhub-api
env: python
plan: standard
region: singapore
rootDir: apps/api
buildCommand: pip install --upgrade pip && pip install -r requirements.txt
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
# preDeployCommand runs BEFORE the new container goes live. If the
# migration fails (or applies to the wrong DB), the deploy aborts and
# the previous container keeps serving — no broken-schema window.
# Was postDeployCommand, but that runs AFTER traffic switches over,
# which let the 2026-04-22 workflow_type drift hit prod for hours.
preDeployCommand: alembic upgrade head
autoDeploy: true
healthCheckPath: /healthz
envVars:
- key: ENVIRONMENT
value: production
# Redis connection: After creating Key Value Store, copy REDIS_URL from the
# Key Value Store service and add it manually to this web service's environment variables
# Example:
# - key: REDIS_URL
# value: redis://red-xxxxx:6379 # Copy from Key Value Store service
# sync: false
# Map secrets via Render Environment Groups or manual entries:
# - fromGroup: trdrhub-api-secrets