-
Notifications
You must be signed in to change notification settings - Fork 13
/
example-secrets.env
178 lines (147 loc) · 7.72 KB
/
example-secrets.env
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
# For local deployment with docker this file should work as is -- no need to edit at all unless
# you want to override something.
# Set any of these to the empty string, e.g.
# export ENABLE_KARTTA=""
# to disable the corresponding app.
export ENABLE_KARTTA=true
export ENABLE_RESERVOIR=true
export ENABLE_NOTER=true
# Change to ENABLE_FE_ID=true to include an extra instance of the iD editor at the url path '/id'.
# Used for development only.
export ENABLE_FE_ID=""
# Set FORCE_ALL_AUTH=true to require login for ALL site resources, even the ones normally visible to non-logged-in-users.
export FORCE_ALL_AUTH=""
# For a k8s deployment, you should manually set the following before running ./k8s/kbootstrap.sh:
export SITE_NAME="Kartta Labs"
export GCP_PROJECT_ID="my-gcp-project-id"
export GCP_REGION=us-"east4"
export GCP_ZONE="us-east4-a"
export SERVER_NAME="localhost" # change this to the fully qualified name of your server, e.g. "kartta.example.com"
export SERVER_SCHEME="http"
export OAUTH_PROXY_CLIENT_ID="xxxxxxxxxxxxxxxxx"
export OAUTH_PROXY_CLIENT_SECRET="xxxxxxxxxxxxxxxxx"
export OAUTH_PROXY_COOKIE_SECRET="xxxxxxxxxxxxxxx"
export EDITOR_SUPPORT_EMAIL="[email protected]"
export EDITOR_SENDGRID_API_KEY="xxxxxxxxxxxxxxxxxx"
export EDITOR_BUCKET_NAME="xxxxxxxxxxxxxxxxxx"
export MAPWARPER_SECRET_KEY_BASE="dryrun-123456789"
export MAPWARPER_GOOGLE_MAPS_KEY="xxxxxxxxxxxxxxxxxxxxxx"
export MAPWARPER_ENABLE_OCR_JOB="false"
# No need to change anything below here even for k8s deployments, unless you want to reconfigure something.
# The following values work as they are for local use with docker.
# For k8s deployments, don't bother changing these; they will get
# overridden by values that kbootstrap.sh will insert below..
export EDITOR_SQL_POSTGRES_PASSWORD=""
export EDITOR_SQL_KARTTAWEB_PASSWORD=""
export EDITOR_DB_HOST="editor-db"
export EDITOR_DB_USER="postgres"
export MAPWARPER_RAILS_ENV="development" # warper docker stuff only works with "development"
export MAPWARPER_DB_HOST="warper-db"
export MAPWARPER_POSTGRES_PASSWORD=""
export MAPWARPER_REDIS_HOST="redis"
export MAPWARPER_GOOGLE_STORAGE_ENABLED="false"
export MAPWARPER_OCR_BUCKET=""
export NOTER_BACKEND_SECRET_KEY=""
export NOTER_BACKEND_DB_HOST="noter-backend-db"
export NOTER_BACKEND_DB_USER="postgres"
export NOTER_BACKEND_POSTGRES_PASSWORD=""
export NOTER_GS_PROJECT_ID=""
# If NOTER_BUCKET is empty, local disk will be used.
# You may lose the data if the disk is not persistent!
export NOTER_BUCKET=""
export NOTER_LOOKUP_ENDPOINT=""
export ID_DEV=true
export FORCE_HTTPS=""
####################################################################
# kbootstrap-begin: do not alter or remove this line!
# Don't make any changes to this section manually; it gets edited by
# kboostrap.sh.
# kbootstrap-end: do not alter or remove this line!
####################################################################
export MAPWARPER_DB_NAME="warper_${MAPWARPER_RAILS_ENV}"
export MAPWARPER_DB_USER="postgres"
export MAPWARPER_DB_PASSWORD="${MAPWARPER_POSTGRES_PASSWORD}"
# The _REPO vars determine where the bootstrap.sh and kbootstrap.sh scripts clone code from. Each of these is
# used to construct a command of the form "git clone ${NAME_REPO} NAME" used to clone the repo; the NAME_REPO
# value can consist of multiple "git clone" args separated by spaces.
export EDITOR_REPO="https://github.com/kartta-labs/editor-website"
export ID_REPO="https://github.com/kartta-labs/iD"
export MAPWARPER_REPO="https://github.com/kartta-labs/mapwarper"
export CGIMAP_REPO="https://github.com/kartta-labs/cgimap"
export RESERVOIR_REPO="https://github.com/kartta-labs/reservoir"
export ANTIQUE_REPO="https://github.com/kartta-labs/antique"
export TEGOLA_REPO="--branch v0.11.2 https://github.com/go-spatial/tegola"
export KARTTA_REPO="https://github.com/kartta-labs/kartta"
export NOTER_BACKEND_REPO="https://github.com/kartta-labs/noter-backend"
export NOTER_FRONTEND_REPO="https://github.com/kartta-labs/noter-frontend"
export KSCOPE_REPO="https://github.com/kartta-labs/kscope"
# If you change any of these port numbers you should also change the corresponding port in docker-compose.yml
# for running locally, or in the various files in k8s/ for running in k8s.
export OAUTH_PROXY_PORT="4180"
export FE_PORT="80"
export MAPWARPER_PORT="3141"
export MAPWARPER_INTERNAL_PORT="3000"
export EDITOR_PORT="2718"
export CGIMAP_PORT="8000"
export KARTTA_PORT="8000"
export LB_PORT="80" # only used in k8s
export HOST_PORT="80" # only used in docker; apps will be at http://localhost:$HOST_PORT
export NOTER_BACKEND_PORT="3001"
export NOTER_FRONTEND_PORT="3000"
export HOST_PORT_SUFFIX=$(echo ":${HOST_PORT}" | sed -e "s/^:80$//")
export OAUTH_PROXY_REDIRECT_URL="${SERVER_SCHEME}://${SERVER_NAME}${HOST_PORT_SUFFIX}/oauth2/callback"
export OAUTH_PROXY_COOKIE_NAME="_kartta_oauth2"
export OAUTH_PROXY_COOKIE_DOMAIN="${SERVER_NAME}"
export OAUTH_PROXY_COOKIE_SECURE="false"
# OAUTH_PROXY_EMAIL_DOMAINS should be a comma-separated list of (double)quote-delimited email domains
# to allow access from. To allow access from all domains, use "*".
export OAUTH_PROXY_EMAIL_DOMAINS="\"*"\"
export FE_SERVER_NAME="${SERVER_NAME}"
export FE_CLIENT_MAX_BODY_SIZE="10M"
export MAPWARPER_SITE_PREFIX="/w"
export MAPWARPER_DB_NAME="warper_${MAPWARPER_RAILS_ENV}"
export MAPWARPER_DB_USER="postgres"
export MAPWARPER_DB_PASSWORD="${MAPWARPER_POSTGRES_PASSWORD}"
export EDITOR_RAILS_ENV="production"
export EDITOR_SERVER_NAME="${SERVER_NAME}"
export EDITOR_SITE_PREFIX="/e"
export EDITOR_DB_NAME="editor_${EDITOR_RAILS_ENV}"
export EDITOR_DB_PASSWORD="${EDITOR_SQL_KARTTAWEB_PASSWORD}"
export EDITOR_DB_POOL="5"
export EDITOR_SERVER_URL="${SERVER_NAME}"
export EDITOR_OTHER_USER_DB_UPDATE_URL="http://warper:${MAPWARPER_INTERNAL_PORT}${MAPWARPER_SITE_PREFIX}/admin/api/v1/users/update.json"
export EDITOR_OTHER_USER_DB_DELETE_URL="http://warper:${MAPWARPER_INTERNAL_PORT}${MAPWARPER_SITE_PREFIX}/admin/api/v1/users/delete.json"
export CGIMAP_DB_HOST="${EDITOR_DB_HOST}"
export CGIMAP_DB_NAME="${EDITOR_DB_NAME}"
export CGIMAP_DB_USER="${EDITOR_DB_USER}"
export CGIMAP_DB_PASSWORD="${EDITOR_DB_PASSWORD}"
export MAPWARPER_SERVER_NAME="${SERVER_NAME}"
export MAPWARPER_DB_POOL="5"
export MAPWARPER_REDIS_URL="redis://${MAPWARPER_REDIS_URL}:6379/0/cache"
export TEGOLA_SERVER_NAME=vectortiles.${SERVER_NAME}
# Note that single (not double) quote chars are required inside the value of TEGOLA_ANTIQUE_ATTRIBUTION,
# because it will pass through multiple evaluations delimited by double quote chars.
export TEGOLA_ANTIQUE_ATTRIBUTION="<a href='/copyright'>Copyright</a>"
export RESERVOIR_PORT="8080"
export KARTTA_SITE_PREFIX=""
export KARTTA_HOME_URL="${SERVER_SCHEME}://${SERVER_NAME}${KARTTA_SITE_PREFIX}"
export KARTTA_TILESERVER_CAPABILITIES_JSON="https://${TEGOLA_SERVER_NAME}/capabilities/antique.json"
# KARTTA_MBGL_TILESERVER_CAPABILITIES_JSON is for use with kartta's preliminary mbgl-* map version
export KARTTA_MBGL_TILESERVER_CAPABILITIES_JSON="https://${TEGOLA_SERVER_NAME}/capabilities/antique.json"
export KARTTA_INITIAL_YEAR="1900"
export KARTTA_INITIAL_ZOOM="15"
export KARTTA_INITIAL_LAT="40.74096"
export KARTTA_INITIAL_LON="-73.99254"
export KARTTA_EDITOR_URL="${SERVER_SCHEME}://${SERVER_NAME}/e"
export KARTTA_NOTER_URL="${SERVER_SCHEME}://${SERVER_NAME}/nf"
export KARTTA_NOTER_API_URL="${SERVER_SCHEME}://${SERVER_NAME}/nb"
export EDITOR_TERMS_DECLINED_URL="${KARTTA_HOME_URL}"
export KSCOPE_BBOX_DATA_URL=""
export KSCOPE_RESERVOIR_URL=""
export NOTER_BACKEND_ADMIN_EMAIL="[email protected]"
export NOTER_BACKEND_ADMIN_PASSWORD="admin"
export GOOGLE_ANALYTICS_TAG=""
export NOMINATIM_SERVER_URL="https://nominatim.openstreetmap.org/"
export KARTTA_LABS_SERVER_TITLE="Kartta Labs server"
export KARTTA_LABS_COPYRIGHT="Kartta Labs"
export KARTTA_LABS_ATTRIBUTION="https://example.org/copyright"