Skip to content

Commit cc67263

Browse files
authored
Parameterization to prepare for deployment to prod (#29)
1 parent 798e3a1 commit cc67263

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

tdei_uw.env

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#
2+
# Resources for dev and stage are often db-dev, db-stage, while prod resources
3+
# are just "db", not "db-prod". This variable allows us to construct the
4+
# environment-prefixed variable values without putting the "-" in ENV which is
5+
# used elsewhere.
6+
#
7+
# **This variable should therefore be set to empty string on prod **
8+
#
9+
ENV_NAME_PARAM=-${ENV}
10+
111
###############################################################################
212
# Docker
313
###############################################################################
@@ -18,18 +28,18 @@ WS_PLATFORM_PRIVACY_POLICY=https://sidewalks.washington.edu/privacy
1828
# Web
1929
###############################################################################
2030

21-
WS_TDEI_FRONTEND_URL=https://portal-${ENV}.tdei.us/
22-
WS_TDEI_BACKEND_URL=https://portal-api-${ENV}.tdei.us/api/v1/
23-
WS_TDEI_API_URL=https://api-${ENV}.tdei.us/api/v1/
24-
WS_TDEI_OIDC_URL=https://account-{$ENV}.tdei.us/
31+
WS_TDEI_FRONTEND_URL=https://portal${ENV_NAME_PARAM}.tdei.us/
32+
WS_TDEI_BACKEND_URL=https://portal-api${ENV_NAME_PARAM}.tdei.us/api/v1/
33+
WS_TDEI_API_URL=https://api${ENV_NAME_PARAM}.tdei.us/api/v1/
34+
WS_TDEI_OIDC_URL=https://account${ENV_NAME_PARAM}.tdei.us/
2535
WS_TDEI_OIDC_REALM=tdei
2636

27-
WS_FRONTEND_HOST=workspaces-${ENV}.sidewalks.washington.edu
28-
WS_API_HOST=api.workspaces-${ENV}.sidewalks.washington.edu
29-
WS_RAPID_HOST=rapid.workspaces-${ENV}.sidewalks.washington.edu
30-
WS_PATHWAYS_EDITOR_HOST=pathways.workspaces-${ENV}.sidewalks.washington.edu
31-
WS_OSM_HOST=osm.workspaces-${ENV}.sidewalks.washington.edu
32-
WS_TASKS_HOST=tasks.workspaces-${ENV}.sidewalks.washington.edu
37+
WS_FRONTEND_HOST=workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
38+
WS_API_HOST=api.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
39+
WS_RAPID_HOST=rapid.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
40+
WS_PATHWAYS_EDITOR_HOST=pathways.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
41+
WS_OSM_HOST=osm.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
42+
WS_TASKS_HOST=tasks.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu
3343

3444
WS_DEV_PORT=3000
3545

@@ -56,15 +66,15 @@ WS_API_DB_NAME=workspaces
5666

5767
WS_OSM_DB_HOST=${WS_POSM_DB_HOST}
5868
WS_OSM_DB_PORT=5432
59-
WS_OSM_DB_USER=workspaces-osm-${ENV}
69+
WS_OSM_DB_USER=workspaces-osm${ENV_NAME_PARAM}
6070
WS_OSM_DB_PASS=${WS_OSM_DB_PASS}
61-
WS_OSM_DB_NAME=workspaces-osm-${ENV}
71+
WS_OSM_DB_NAME=workspaces-osm${ENV_NAME_PARAM}
6272

6373
WS_TASKS_DB_HOST=${WS_POSM_DB_HOST}
6474
WS_TASKS_DB_PORT=5432
65-
WS_TASKS_DB_USER=workspaces-tasks-${ENV}
75+
WS_TASKS_DB_USER=workspaces-tasks${ENV_NAME_PARAM}
6676
WS_TASKS_DB_PASS=${WS_TASKS_DB_PASS}
67-
WS_TASKS_DB_NAME=workspaces-tasks-${ENV}
77+
WS_TASKS_DB_NAME=workspaces-tasks${ENV_NAME_PARAM}
6878

6979
###############################################################################
7080
# Mail

0 commit comments

Comments
 (0)