-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
36 lines (34 loc) · 865 Bytes
/
render.yaml
File metadata and controls
36 lines (34 loc) · 865 Bytes
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
services:
# Backend API service
- type: web
name: fake-so-api
env: node
plan: free
buildCommand: cd server && npm install
startCommand: cd server && npm start
envVars:
- key: MONGO_URL
value: $RENDER_MONGODB_URI
- key: CLIENT_URL
value: https://fake-so-client.onrender.com
- key: PORT
value: 8080
- key: JWT_SECRET
value: "stackoverflowsecret"
# Frontend service
- type: web
name: fake-so-client
env: static
buildCommand: cd client && npm install && CI=false npm run build
staticPublishPath: client/build
envVars:
- key: REACT_APP_API_URL
value: https://fake-so-api.onrender.com
routes:
- type: rewrite
source: /*
destination: /index.html
# Use Render's MongoDB add-on
databases:
- name: fake-so-db
plan: free