From 52c52d53b7ea6062fec46c4e28b952587f38e2ca Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Mon, 16 Sep 2024 14:07:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(docker)=20add=20missing=20frontent?= =?UTF-8?q?=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The env MEDIA_URL was missing in the frontend Dockerfile. It is not necessary in our running environment (staging / preprod ...) but it is necessary if we want to run the frontend with a different media url. SW_DEACTIVATED was missing as well, we need to deactivate the service worker in the frontend when we test with Playwright. --- src/frontend/Dockerfile | 6 ++++++ src/frontend/apps/impress/.env | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index ff087362..789c4070 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -70,6 +70,12 @@ ENV NEXT_PUBLIC_Y_PROVIDER_URL=${Y_PROVIDER_URL} ARG API_ORIGIN ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN} +ARG MEDIA_URL +ENV NEXT_PUBLIC_MEDIA_URL=${MEDIA_URL} + +ARG SW_DEACTIVATED +ENV NEXT_PUBLIC_SW_DEACTIVATED=${SW_DEACTIVATED} + RUN yarn build # ---- Front-end image ---- diff --git a/src/frontend/apps/impress/.env b/src/frontend/apps/impress/.env index 41724eaa..393b6b3c 100644 --- a/src/frontend/apps/impress/.env +++ b/src/frontend/apps/impress/.env @@ -1,4 +1,5 @@ NEXT_PUBLIC_API_ORIGIN= NEXT_PUBLIC_Y_PROVIDER_URL= NEXT_PUBLIC_MEDIA_URL= -NEXT_PUBLIC_THEME=dsfr \ No newline at end of file +NEXT_PUBLIC_THEME=dsfr +NEXT_PUBLIC_SW_DEACTIVATED=