-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtemplate.prod.env
More file actions
47 lines (41 loc) · 2.45 KB
/
template.prod.env
File metadata and controls
47 lines (41 loc) · 2.45 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
# ------------------------------------------------------------------------------
# CAUTION:
# Ensure you're modifying the .env version of this file, not the template.*.env
# versions. The .env version is the one that actually gets used by the code. The
# template.*.env versions are the master copies that you copy to .env and then
# modify.
# ------------------------------------------------------------------------------
# Environment Config -- for secrets and config variables
# Reference these in the code with process.env.SECRET
BEEMINDER_CLIENT_ID='REPLACEMEwithActualIDGeneratedByBeeminder'
AUTH_REDIRECT_URI='https://graph.beeminder.com/connect'
SESSION_SECRET='REPLACEMEwithFreshlyGeneratedUUIDorOtherUniqueUnguessableString'
# Leave these unmodified unless you know what you're doing
DB_USER=''
DB_PASS=''
# NB: .env is a shell file so there can't be spaces around '='
# Only the non-secret versions of this file -- template.*.env -- are in version
# control.
# SETUP INSTRUCTIONS -----------------------------------------------------------
# 0. This only has to be done once or when moving where this is hosted
# 1. Copy this file (template.prod.env) to .env & follow remaining steps there
# 2. Log into your personal Beeminder account
# 3. Go to beeminder.com/apps and click Register A New App
# 4. Put "Beebrain Graph Editor" or similar as the application name
# 5. Put https://graph.beeminder.com/connect as the Redirect URL in Beeminder
# (This used to be road.beeminder.com and could change again. We can also
# make any number of clones like graph-staging42.onrender.com and just add
# /connect to that to make the Redirect URL.)
# 6. Also fill in that URL above as the AUTH_REDIRECT_URI config variable
# 7. Leave the Callback URLs blank in the Beeminder form
# 8. Click the Register button to register the app
# 9. Beeminder generates and shows you the Client ID and Client Secret
# (Client Secret isn't needed)
# 10. Copy the Client ID to the BEEMINDER_CLIENT_ID config variable above
# 11. Make up a UUID (long random string) for the SESSION_SECRET config variable
# 12. Grep "REPLACEME" to ensure the only instance is the one in this sentence!
#
# To review, you've now copied this template.prod.env file to .env and filled in
# all the values for the config variables and ensured that the template version
# remains the master copy. This is confusing to the uninitiated!
# ------------------------------------------------------------------------------