Skip to content

Commit 980e126

Browse files
authored
Changes needed to support SSO for admin access on Demos (#15436)
* Ensure the release build passes through the env var to bootstrap Demo SSO users if needed * More triggering work on the Dockerfile * Add way to stop downloading the DB via the file clock
1 parent c3ed5d2 commit 980e126

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ ENV GIT_SHA=${GIT_SHA}
128128
#
129129
FROM app-base AS release
130130

131+
ARG DEMO_SERVER_ADMIN_USERS
132+
ENV DEMO_SERVER_ADMIN_USERS=${DEMO_SERVER_ADMIN_USERS}
133+
131134
RUN bin/run-sync-all.sh
132135

133136
COPY --from=assets /app/assets /app/assets

bin/run-file-clock.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
66

7-
bin/run-db-download.py --force
7+
# On demos, we don't want to download the latest DB, else we'll lose CMS data
8+
SKIP_FORCED_DB_DOWNLOAD=$(echo "${SKIP_FORCED_DB_DOWNLOAD:-false}" | tr '[:upper:]' '[:lower:]')
9+
if [[ "$SKIP_FORCED_DB_DOWNLOAD" == "false" ]]; then
10+
bin/run-db-download.py --force
11+
fi
12+
813
LOCAL_DB_UPDATE=$(echo "${LOCAL_DB_UPDATE:-false}" | tr '[:upper:]' '[:lower:]')
914
if [[ "$LOCAL_DB_UPDATE" == "true" ]]; then
1015
python manage.py migrate --noinput

gcp/bedrock-demos/cloudrun/mozorg-demo.env.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ SECURE_SSL_REDIRECT: "True"
2323
SENTRY_DSN: https://[email protected]/6260338
2424
SWITCH_NEWSLETTER_MAINTENANCE_MODE: "False"
2525
WAGTAIL_ENABLE_ADMIN: "True"
26+
SKIP_FORCED_DB_DOWNLOAD: "True"

0 commit comments

Comments
 (0)