From f0251df786c7fa511b74954e3dae2ae714ca6eeb Mon Sep 17 00:00:00 2001 From: Jeff Maki Date: Tue, 18 Mar 2025 18:32:54 -0400 Subject: [PATCH] Parameterization to prepare for deployment to prod --- tdei_uw.env | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/tdei_uw.env b/tdei_uw.env index 2b74124..68116c3 100644 --- a/tdei_uw.env +++ b/tdei_uw.env @@ -1,3 +1,13 @@ +# +# Resources for dev and stage are often db-dev, db-stage, while prod resources +# are just "db", not "db-prod". This variable allows us to construct the +# environment-prefixed variable values without putting the "-" in ENV which is +# used elsewhere. +# +# **This variable should therefore be set to empty string on prod ** +# +ENV_NAME_PARAM=-${ENV} + ############################################################################### # Docker ############################################################################### @@ -18,18 +28,18 @@ WS_PLATFORM_PRIVACY_POLICY=https://sidewalks.washington.edu/privacy # Web ############################################################################### -WS_TDEI_FRONTEND_URL=https://portal-${ENV}.tdei.us/ -WS_TDEI_BACKEND_URL=https://portal-api-${ENV}.tdei.us/api/v1/ -WS_TDEI_API_URL=https://api-${ENV}.tdei.us/api/v1/ -WS_TDEI_OIDC_URL=https://account-{$ENV}.tdei.us/ +WS_TDEI_FRONTEND_URL=https://portal${ENV_NAME_PARAM}.tdei.us/ +WS_TDEI_BACKEND_URL=https://portal-api${ENV_NAME_PARAM}.tdei.us/api/v1/ +WS_TDEI_API_URL=https://api${ENV_NAME_PARAM}.tdei.us/api/v1/ +WS_TDEI_OIDC_URL=https://account${ENV_NAME_PARAM}.tdei.us/ WS_TDEI_OIDC_REALM=tdei -WS_FRONTEND_HOST=workspaces-${ENV}.sidewalks.washington.edu -WS_API_HOST=api.workspaces-${ENV}.sidewalks.washington.edu -WS_RAPID_HOST=rapid.workspaces-${ENV}.sidewalks.washington.edu -WS_PATHWAYS_EDITOR_HOST=pathways.workspaces-${ENV}.sidewalks.washington.edu -WS_OSM_HOST=osm.workspaces-${ENV}.sidewalks.washington.edu -WS_TASKS_HOST=tasks.workspaces-${ENV}.sidewalks.washington.edu +WS_FRONTEND_HOST=workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu +WS_API_HOST=api.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu +WS_RAPID_HOST=rapid.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu +WS_PATHWAYS_EDITOR_HOST=pathways.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu +WS_OSM_HOST=osm.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu +WS_TASKS_HOST=tasks.workspaces${ENV_NAME_PARAM}.sidewalks.washington.edu WS_DEV_PORT=3000 @@ -56,15 +66,15 @@ WS_API_DB_NAME=workspaces WS_OSM_DB_HOST=${WS_POSM_DB_HOST} WS_OSM_DB_PORT=5432 -WS_OSM_DB_USER=workspaces-osm-${ENV} +WS_OSM_DB_USER=workspaces-osm${ENV_NAME_PARAM} WS_OSM_DB_PASS=${WS_OSM_DB_PASS} -WS_OSM_DB_NAME=workspaces-osm-${ENV} +WS_OSM_DB_NAME=workspaces-osm${ENV_NAME_PARAM} WS_TASKS_DB_HOST=${WS_POSM_DB_HOST} WS_TASKS_DB_PORT=5432 -WS_TASKS_DB_USER=workspaces-tasks-${ENV} +WS_TASKS_DB_USER=workspaces-tasks${ENV_NAME_PARAM} WS_TASKS_DB_PASS=${WS_TASKS_DB_PASS} -WS_TASKS_DB_NAME=workspaces-tasks-${ENV} +WS_TASKS_DB_NAME=workspaces-tasks${ENV_NAME_PARAM} ############################################################################### # Mail