-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
43 lines (42 loc) · 1.2 KB
/
Copy pathrender.yaml
File metadata and controls
43 lines (42 loc) · 1.2 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
services:
# Backend API Service
- type: web
name: lullaibot-edu-api
env: node
rootDir: src/server
buildCommand: npm install
startCommand: npm start
envVars:
- key: NODE_ENV
value: production
- key: PORT
value: 10000
- key: MONGODB_URI
sync: false # This will be set manually in Render dashboard
- key: JWT_SECRET
sync: false # This will be set manually in Render dashboard
- key: JWT_EXPIRES_IN
value: "30d" # Token expires in 30 days
- key: JWT_COOKIE_EXPIRES_IN
value: 30 # Cookie expires in 30 days
- key: FRONTEND_URL
fromService:
name: lullaibot-edu-frontend
type: web
property: host
envVarPrefix: "https://"
# Frontend Static Site
- type: web
name: lullaibot-edu-frontend
env: static
rootDir: .
buildCommand: npm install && VITE_API_URL=https://lullaibot-edu-api.onrender.com/api npm run build
staticPublishPath: ./dist
# Add routes for SPA
routes:
- type: rewrite
source: /*
destination: /index.html
envVars:
- key: VITE_API_URL
value: "https://lullaibot-edu-api.onrender.com/api"