-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
44 lines (44 loc) · 1.47 KB
/
render.yaml
File metadata and controls
44 lines (44 loc) · 1.47 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
services:
- type: web
name: grapho2c
runtime: python
# plan: starter # Upgrade in Render UI when billing is set up
rootDir: backend
buildCommand: |
set -e
echo "BUILD START - PWD=$(pwd)"
echo "=== Python deps ==="
pip install -r requirements.txt
echo "=== Frontend build ==="
cd ..
echo "PARENT PWD=$(pwd)"
ls -la
if [ ! -d "frontend" ]; then echo "ERROR: frontend dir missing"; exit 1; fi
cd frontend
npm ci
npm run build
echo "=== Verify dist ==="
ls -la ../frontend-dist/
ls -la ../frontend-dist/assets/
cat ../frontend-dist/index.html
echo "=== Copy dist into backend/static ==="
rm -rf ../backend/static
cp -r ../frontend-dist ../backend/static
echo "=== Verify backend/static ==="
ls -la ../backend/static/
ls -la ../backend/static/assets/
echo "=== Done ==="
startCommand: python main.py
envVars:
- key: GROQ_API_KEY
sync: false # set manually in Render dashboard — never committed
- key: GRAPHO2C_API_KEY
sync: false # generate: python -c "import secrets; print(secrets.token_urlsafe(32))"
- key: SENTRY_DSN
sync: false # get from sentry.io → New Project → Python → FastAPI
- key: ENVIRONMENT
value: production
- key: RENDER_EXTERNAL_URL
value: https://grapho2c.onrender.com
- key: PORT
value: 10000