forked from Aditi22Bansal/PBL2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
49 lines (47 loc) · 1.33 KB
/
Copy pathrender.yaml
File metadata and controls
49 lines (47 loc) · 1.33 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
services:
# 1. Node.js Backend (Express + Socket.io)
- type: web
name: pbl2-node-backend
env: node
plan: free
rootDir: backend
buildCommand: npm install
startCommand: node server.js
envVars:
- key: PORT
value: 5000
- key: MONGO_URI
sync: false # You must set this manually in the Render Dashboard!
# 2. Python Backend (FastAPI + ML Engine)
- type: web
name: pbl2-python-backend
env: python
plan: free
rootDir: backend
buildCommand: pip install -r requirements.txt
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
envVars:
- key: PORT
value: 8000
- key: PYTHON_VERSION
value: 3.10.0
# 3. Frontend (Next.js App)
- type: web
name: pbl2-frontend
env: node
plan: free
rootDir: frontend
buildCommand: npm install && npm run build
startCommand: npm start
envVars:
- key: NEXT_PUBLIC_API_URL
fromService:
type: web
name: pbl2-node-backend
property: url
- key: NEXTAUTH_URL
# We temporarily set this to localhost, Render will overwrite it if we configure custom domains later.
# But you should update this in the dashboard to the final frontend URL.
sync: false
- key: NEXTAUTH_SECRET
generateValue: true