-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
26 lines (26 loc) · 1.11 KB
/
Copy pathrender.yaml
File metadata and controls
26 lines (26 loc) · 1.11 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
services:
- type: web
name: forge-backend
env: python
plan: free
region: oregon
buildCommand: |
pip install --upgrade pip
pip install -r backend/requirements.txt
# Runs migrations before startup. Always exits 0 so a DB hiccup won't block deploy.
preDeployCommand: "cd backend && python -c \"import sys; sys.path.insert(0, '.'); from app.database import init_db; init_db(); sys.exit(0)\""
startCommand: cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT --workers 1 --timeout-keep-alive 30
envVars:
- key: PYTHON_VERSION
value: "3.11"
- key: FORGE_PG_DSN
sync: false
# IMPORTANT: Supabase direct connections (port 5432) resolve to IPv6, which
# Render free tier does NOT support. Use the Session Pooler instead:
# postgresql://postgres.[ref]:[pw]@aws-0-[region].pooler.supabase.com:6543/postgres?sslmode=require
- key: FORGE_DB_PATH
value: "/opt/render/project/src/backend/app/forge.db"
- key: PYTHONPATH
value: "/opt/render/project/src/backend"
healthCheckPath: /health
autoDeploy: true