Repository navigation
Expand file tree
/
Copy pathrender.yaml
More file actions
58 lines (56 loc) · 1.7 KB
/
Copy pathrender.yaml
File metadata and controls
58 lines (56 loc) · 1.7 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
# Render Blueprint for Power Dashboard
# https://render.com/docs/blueprint-spec
#
# Two services deploy from main on every merge:
# power-dashboard static front end (always on, served from the CDN)
# power-dashboard-api FastAPI backend running the simulator
#
# The front end stays up while the free tier API sleeps, so visitors see the
# wake screen instead of a blank page. Build filters keep a docs only change
# from redeploying anything.
services:
- type: web
name: power-dashboard-api
runtime: python
plan: free
branch: main
autoDeployTrigger: commit
rootDir: backend
buildCommand: pip install -r requirements.txt
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
healthCheckPath: /api/health
buildFilter:
paths:
- backend/**
ignoredPaths:
- backend/tests/**
envVars:
- key: PYTHON_VERSION
value: 3.13.1
- key: DATA_SOURCE
value: simulator
- key: CORS_ORIGINS
value: "*"
- type: web
name: power-dashboard
runtime: static
branch: main
autoDeployTrigger: commit
rootDir: frontend
buildCommand: npm ci && npm run build
staticPublishPath: dist
buildFilter:
paths:
- frontend/**
ignoredPaths:
- frontend/src/**/*.test.js
# No rewrite rule needed: the app uses hash routes (/#/alarms), so every
# page refresh requests index.html. VITE_API_URL is optional; without it
# the build points at https://power-dashboard-api.onrender.com.
headers:
- path: /assets/*
name: Cache-Control
value: public, max-age=31536000, immutable
- path: /index.html
name: Cache-Control
value: no-cache