-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
40 lines (39 loc) · 1.59 KB
/
Copy pathrender.yaml
File metadata and controls
40 lines (39 loc) · 1.59 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
35
36
37
38
39
40
# Render Infrastructure-as-Code for the EvalLab API.
#
# Connecting this repo to Render and choosing "Auto-deploy from this file"
# is enough to bring the service up. The dashboard will create the service
# and prompt you for the secret env vars (DATABASE_URL, GROQ_API_KEY,
# EVALLAB_API_KEY) — those are NOT in this file by design.
#
# Frontend (Vercel) and database (Neon) are not described here because
# Render IaC only covers Render-managed resources.
services:
- type: web
name: evallab-api
runtime: python
plan: free
rootDir: apps/api
# Install uv, sync deps, then run pending Alembic migrations. Migration
# apply on every deploy is cheap (no-op when already at head) and removes
# a manual step that would otherwise be easy to forget.
buildCommand: pip install uv && uv sync --frozen && uv run alembic upgrade head
startCommand: uv run uvicorn src.main:app --host 0.0.0.0 --port $PORT
healthCheckPath: /api/v1/health
autoDeploy: true
envVars:
- key: PYTHON_VERSION
value: "3.11"
# Neon connection string — paste in dashboard. Use the asyncpg scheme:
# postgresql+asyncpg://USER:PASS@HOST/DB?ssl=require
- key: DATABASE_URL
sync: false
- key: GROQ_API_KEY
sync: false
# API gate. Set to a long random string in production so only the
# paired frontend can hit the API.
- key: EVALLAB_API_KEY
sync: false
# Comma-separated. Include the Vercel frontend URL plus localhost
# for any local development that points at this service.
- key: CORS_ORIGINS
sync: false