-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
87 lines (86 loc) · 1.95 KB
/
render.yaml
File metadata and controls
87 lines (86 loc) · 1.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Instructions:
# 1 - Replace all occurrences of 'base' with the shorthand name of this app
# 2 - Deploy to render
# 3 - Fill in environment variables
# 4 - Once external URLs are assigned, update them in rewrite rules for frontend
databases:
- name: myapp-postgres
databaseName: base
user: app
plan: free
region: frankfurt
ipAllowList:
- source: 0.0.0.0/0
description: everywhere
postgresMajorVersion: "16"
services:
- name: myapp-api
type: web
runtime: docker
repo: https://github.com/semihsezer/myapp
plan: free
envVars:
- key: PORT
value: 8000
- key: BACKEND_URL
sync: false
- key: FRONTEND_URL
sync: false
- key: POSTGRES_USER
sync: false
- key: POSTGRES_PASSWORD
fromDatabase:
name: myapp-postgres
property: password
- key: POSTGRES_HOST
fromDatabase:
name: myapp-postgres
property: host
- key: DJANGO_SECRET_KEY
sync: false
- key: DJANGO_ALLOWED_HOSTS
sync: false
- key: DJANGO_DEBUG
sync: false
- key: GOOGLE_AUTH_CLIENT_SECRET
sync: false
- key: GOOGLE_AUTH_CLIENT_ID
sync: false
region: frankfurt
dockerCommand: /bin/sh -c python manage.py migrate && python manage.py runserver
0.0.0.0:8000
dockerContext: .
dockerfilePath: ./Dockerfile
buildFilter:
paths:
- server/**
rootDir: server
- type: web
name: myapp-ui
runtime: static
repo: https://github.com/semihsezer/myapp
envVars:
- key: REACT_APP_BACKEND_URL
fromService:
name: myapp-api
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: REACT_APP_FRONTEND_URL
fromService:
name: myapp-ui
type: web
envVarKey: RENDER_EXTERNAL_URL
buildCommand: npm install;CI=false npm run build
staticPublishPath: build
routes:
- type: rewrite
source: /api/*
destination: https://temp-backend/api/*
- type: rewrite
source: /*
destination: /index.html
buildFilter:
paths:
- frontend/**
rootDir: frontend
version: "1"