-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrender.yaml
More file actions
61 lines (59 loc) · 2.39 KB
/
Copy pathrender.yaml
File metadata and controls
61 lines (59 loc) · 2.39 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Render Blueprint (#340) for a single-service PARTHA deployment: one web
# service (FastAPI serving both the API and the built frontend, per #339),
# one PostgreSQL database, one persistent disk for cloned/uploaded
# repositories. Docker-based rather than Render's native Python runtime,
# because the build needs Node to build the frontend before the Python
# service ever starts -- see ./Dockerfile.
#
# Before deploying from this blueprint:
# 1. Choose a plan for both the web service and the database in Render's
# dashboard when you create them -- this file intentionally doesn't
# pin one, since pricing/plan names change and that's a cost decision,
# not an engineering one. The web service's plan must support a
# persistent disk (the free tier does not).
# 2. After the service exists, set AI_ENCRYPTION_KEY manually in the
# Render dashboard (Environment tab) -- generate it with:
# python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
# It is marked `sync: false` below on purpose: Render's generic
# generateValue only produces a random string, not the specific
# URL-safe-base64-of-32-bytes shape a Fernet key requires.
# 3. AUTH_SECRET_KEY is auto-generated by Render (`generateValue: true`)
# and needs no manual step.
# 4. Update CORS_ORIGINS below if the public domain changes from
# www.partha.uk.
#
# Database migrations run as part of the container's own startup command
# (see the Dockerfile CMD) rather than a separate release-phase step --
# AUTO_CREATE_TABLES defaults to false outside development/test, so this is
# required for the app to boot against a real schema, not optional polish.
services:
- type: web
name: partha
runtime: docker
dockerfilePath: ./Dockerfile
dockerContext: .
healthCheckPath: /ready
envVars:
- key: APP_ENV
value: production
- key: LOG_FORMAT
value: json
- key: DATABASE_URL
fromDatabase:
name: partha-db
property: connectionString
- key: STORAGE_PATH
value: /var/data/storage
- key: CORS_ORIGINS
value: https://www.partha.uk
- key: AUTH_SECRET_KEY
generateValue: true
- key: AI_ENCRYPTION_KEY
sync: false
disk:
name: partha-storage
mountPath: /var/data
sizeGB: 5
databases:
- name: partha-db
postgresMajorVersion: "16"