-
Notifications
You must be signed in to change notification settings - Fork 50
/
variables.yml
339 lines (290 loc) · 7.41 KB
/
variables.yml
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# Uncomment me to test system
# - id: FOO
# usedBy:
# - results
# - graphiql
# - surveyform
# - surveyadmin
- id: APP_NAME
description: Name of the app
example: surveyform, api, results, surveyadmin
usedBy:
- api
- results
- surveyform
- surveyadmin
- homepage
- charts
- id: API_URL
aliases:
- REACT_APP_API_URL
- GATSBY_API_URL
description: URL of the API
example: https://api.devographics.com
usedBy:
- results
- results-astro
- graphiql
- surveyform
- surveyadmin
- homepage
- charts
- id: API_URL_PRODUCTION
optional: true
description: URL of the production API (so the admin area can handle it when running locally)
example: https://api.devographics.com
usedBy:
- surveyadmin
- id: APP_URL
aliases:
- NEXT_PUBLIC_APP_URL
description: Full URL the app is running on
example: https://survey.devographics.com
usedBy:
- surveyform
- id: NODE_ENV
aliases:
- NEXT_PUBLIC_NODE_ENV
description: Environment the app is running in
example: production
usedBy:
- surveyform
# Mongo
- id: MONGO_PRIVATE_URI
description: URI of the private Mongo database
example: mongodb+srv://surveys:password@foobar.fnzofph.mongodb.net/private_data
usedBy:
- surveyform
- surveyadmin
- id: MONGO_PUBLIC_URI
description: URI of the public Mongo database
example: mongodb+srv://surveys:password@foobar.fnzofph.mongodb.net/public_data
usedBy:
- surveyadmin
- api
- id: MONGO_PUBLIC_URI_READONLY
optional: true
description: URI of the public Mongo database, read-only access
example: mongodb+srv://surveys:password@foobar.fnzofph.mongodb.net/public_data
usedBy:
- surveyadmin
- id: MONGO_PRIVATE_DB
description: Name of the database where private data is stored
example: private_data
usedBy:
- surveyform
- surveyadmin
- id: MONGO_PUBLIC_DB
description: Name of the database where public data is stored
example: public_data
usedBy:
- api
- surveyadmin
# Redis
- id: REDIS_URL
description: URL of the Redis database (using HTTP protocol for serverless)
example: rediss://red-foo:foobar@oregon-redis.render.com:6379
optional: true
usedBy:
- api
- surveyadmin
- id: REDIS_UPSTASH_URL
description: URL of the Redis Upstash database (using HTTP protocol for serverless)
example: https://welcomed-porpoise-41931.upstash.io
optional: true
usedBy:
- api
- surveyform
- surveyadmin
- results
- results-astro
- homepage
- charts
- id: REDIS_TOKEN
description: >
Redis token (needed for Upstash).
When using a local setup, the token is set when running the Redis proxy (see Docker-compose file).
example: AaMEASQgN...TDJjNDg1NDWQ=
usedBy:
- api
- surveyform
- surveyadmin
- results
- results-astro
- homepage
- charts
### GitHub
- id: GITHUB_TOKEN
description: GitHub access token
example: github_pat_11AndT_knNX54FA...
usedBy:
- api
- id: GITHUB_PATH_SURVEYS
description: Path to surveys repo/directory on GitHub
example: owner/repo/subdir (subdir is optional)
usedBy:
- api
- id: GITHUB_PATH_LOCALES
description: Path to locales repo/directory on GitHub
example: owner/repo/subdir OR owner (in which case it's assumed all locales have their own repo)
usedBy:
- api
- id: GITHUB_PATH_ENTITIES
description: Path to entities repo/directory on GitHub
example: owner/repo/subdir (subdir is optional)
usedBy:
- api
### Email
- id: EMAIL_OCTOPUS_APIKEY
usedBy:
- surveyform
- id: DEFAULT_MAIL_FROM
example: surveys@devographics.com
optional: true
usedBy:
- surveyform
- id: SMTP_HOST
example: email-smtp.us-east-1.amazonaws.com
usedBy:
- surveyform
- id: SMTP_HOST
example: email-smtp.us-east-1.amazonaws.com
usedBy:
- surveyform
- id: SMTP_PORT
example: 465
usedBy:
- surveyform
- id: SMTP_SECURE
example: "'1' or '' for an emtpy value"
# (boolean variables must be optional
# as they can be unset or set to an empty string)
optional: true
usedBy:
- surveyform
- id: SMTP_USER
usedBy:
- surveyform
- id: SMTP_PASS
usedBy:
- surveyform
### Other Config
- id: ENCRYPTION_KEY
description: Encryption key to hash emails
usedBy:
- surveyform
- id: SECRET_KEY
description: >
Secret key used to verify external webhook requests
Surveyform and API should have a different key
Surveyadmin should know both keys to be able to send request
New keys can be generated via "openssl -base64 32
usedBy:
- surveyform
- api
- id: API_SECRET_KEY
usedBy:
- surveyadmin
- id: SURVEYFORM_SECRET_KEY
usedBy:
- surveyadmin
- id: SURVEYFORM_URL
description: >
Used to call surveyform webhooks,
namely to indicate a change in the loaded values (surveys, entities...)
usedBy: api
- id: ASSETS_URL
aliases:
- NEXT_PUBLIC_ASSETS_URL
description: Where to get static assets from. /!\ in frontend apps, must be public (NEXT_PUBLIC_)
example: https://assets.devographics.com/
usedBy:
- surveyform
- results
- id: TOKEN_SECRET
description: Used by magic login
example: cbabc40...115fd1affc789cc6f
usedBy:
- surveyform
### Results
- id: SURVEYID
description: The id of the survey, when rendering a results site
example: state_of_css
usedBy:
- results
- results-astro
- homepage
- id: EDITIONID
description: The id of the survey edition, when rendering a results site
example: css2023
usedBy:
- results
- results-astro
- id: FAST_BUILD
optional: true
description: Enable "fast build" mode, which skips most locales and block subpages
example: "'true' if activated, any other value or empty if disabled"
usedBy:
- results
- homepage
- id: SURVEYS_URL
description: Where to get the cached JSON survey data (deployed via GitHub Pages)
example: https://devographics.github.io/surveys
usedBy:
- results
### SendOwl
- id: SENDOWL_API_KEY
description: SendOwl API key (used for selling chart sponsorships)
example: 3df5f...
usedBy:
- results
- id: SENDOWL_SECRET
description: SendOwl secret (used for selling chart sponsorships)
example: 64754...
usedBy:
- results
### Local Dev (all optional)
- id: LOGS_PATH
optional: true
description: Absolute path to logs dir
example: /Users/sacha/monorepo/surveyform/.logs
usedBy:
- results
- api
- surveyform
- surveyadmin
- id: SURVEYS_PATH
optional: true
description: Absolute path to local directory from which to load survey outlines
example: /Users/devographics/surveys
usedBy:
- api
- id: LOCALES_PATH
optional: true
description: Absolute path to local directory from which to load locales data
example: /Users/devographics/locales
usedBy:
- api
- id: ENTITIES_PATH
optional: true
description: Absolute path to local directory from which to load entities
example: /Users/devographics/entities
usedBy:
- api
- id: DISABLE_CACHE
optional: true
description: Set to `true` to always fetch data via API
example: "'true' or ''"
usedBy:
- surveyform
- results
- id: PORT
optional: true
description: Which port to run the app on
example: 5000
usedBy:
- api
- surveyform
- surveyadmin
- results
- graphiql