forked from mysociety/local-intelligence-hub
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render.yaml
179 lines (179 loc) · 4.83 KB
/
render.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
version: "1"
previewsEnabled: true
previewsExpireAfterDays: 3
databases:
- name: meep-database
databaseName: meep_database
user: meep_database_user
previewPlan: starter
region: frankfurt
postgresMajorVersion: "16"
services:
- type: web
name: meep-intelligence-hub-backend
runtime: python
repo: https://github.com/commonknowledge/mapped
previewPlan: starter
envVars:
- key: ENVIRONMENT
value: production
previewValue: staging
- key: SCHEDULED_UPDATE_SECONDS_DELAY
value: 0
- key: BASE_URL
fromService:
name: meep-intelligence-hub-backend
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: FRONTEND_BASE_URL
fromService:
name: meep-intelligence-hub-frontend
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: DATABASE_URL
fromDatabase:
name: meep-database
property: connectionString
- key: CORS_ALLOWED_ORIGINS
fromService:
name: meep-intelligence-hub-frontend
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: ALLOWED_HOSTS
fromService:
name: meep-intelligence-hub-backend
type: web
envVarKey: RENDER_EXTERNAL_HOSTNAME
- key: CACHE_FILE
value: /tmp/meep
- fromGroup: MEEP production environment
region: frankfurt
buildCommand: poetry install
startCommand: python manage.py collectstatic --noinput && python manage.py compress
--force && gunicorn local_intelligence_hub.asgi:application -k uvicorn.workers.UvicornWorker
preDeployCommand: python manage.py migrate
# Requires the following to be privately added to the MEEP production environment:
# DJANGO_SUPERUSER_USERNAME, DJANGO_SUPERUSER_PASSWORD, DJANGO_SUPERUSER_EMAIL
# SEED_AIRTABLE_MEMBERLIST_BASE_ID, SEED_AIRTABLE_MEMBERLIST_TABLE_NAME, SEED_AIRTABLE_MEMBERLIST_API_KEY
initialDeployHook: python manage.py seed
healthCheckPath: /
buildFilter:
ignoredPaths:
- nextjs/**
- type: worker
name: meep-intelligence-hub-worker
runtime: python
repo: https://github.com/commonknowledge/mapped
previewPlan: starter
envVars:
- key: ENVIRONMENT
value: production
previewValue: staging
- key: DATABASE_URL
fromDatabase:
name: meep-database
property: connectionString
- key: SCHEDULED_UPDATE_SECONDS_DELAY
value: 0
- key: CACHE_FILE
value: /tmp/meep
- key: BASE_URL
fromService:
name: meep-intelligence-hub-backend
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: FRONTEND_BASE_URL
fromService:
name: meep-intelligence-hub-frontend
type: web
envVarKey: RENDER_EXTERNAL_URL
- fromGroup: MEEP production environment
region: frankfurt
buildCommand: poetry install
startCommand: python manage.py procrastinate worker
preDeployCommand: python manage.py migrate
buildFilter:
ignoredPaths:
- nextjs/**
- type: web
name: meep-intelligence-hub-frontend
runtime: node
repo: https://github.com/commonknowledge/mapped
previewPlan: starter
envVars:
- key: NEXT_PUBLIC_ENVIRONMENT
value: production
previewValue: staging
- key: NEXT_PUBLIC_BACKEND_URL
fromService:
name: meep-intelligence-hub-backend
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: NEXT_PUBLIC_FRONTEND_URL
fromService:
name: meep-intelligence-hub-frontend
type: web
envVarKey: RENDER_EXTERNAL_URL
- fromGroup: MEEP production environment
region: frankfurt
buildCommand: npm install && npm run build
startCommand: npm run start
buildFilter:
paths:
- nextjs/**
rootDir: nextjs
# Reuse the production MinIO to save on services.
# Also because we can't hardcode credentials right now.
# - type: web
# name: minio-server
# runtime: image
# image:
# url: docker.io/minio/minio:latest
# plan: starter
# previewPlan: starter
# envVars:
# - key: CONSOLE_PORT
# sync: false
# - key: PORT
# sync: false
# - key: HOST
# sync: false
# - key: MINIO_ROOT_USER
# sync: false
# - key: MINIO_ROOT_PASSWORD
# sync: false
# - key: MINIO_BROWSER
# sync: false
# region: frankfurt
# healthCheckPath: /minio/health/live
# dockerCommand: minio server /data --address $HOST:$PORT --console-address $HOST:$CONSOLE_PORT
# domains:
# - uploads.commonknowledge.coop
# disk:
# name: data
# mountPath: /data
# sizeGB: 10
# autoDeploy: false
# - type: web
# name: minio-console
# runtime: image
# image:
# url: docker.io/minio/console:v0.30.0
# plan: starter
# previewPlan: starter
# envVars:
# - key: MINIO_HOST
# fromService:
# name: minio-server
# type: ""
# property: host
# - key: PORT
# sync: false
# - key: CONSOLE_PBKDF_SALT
# sync: false
# - key: CONSOLE_PBKDF_PASSPHRASE
# sync: false
# region: frankfurt
# dockerCommand: /bin/bash -c CONSOLE_MINIO_SERVER=https://$MINIO_HOST.onrender.com
# ./console server --port $PORT
# autoDeploy: false