From 2391098aba8ebe3e0f42f9c67aed540701637fe9 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 15 Aug 2024 12:48:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(docker)=20frontend=20env=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the environment variables configurable for the frontend app in the Dockerfile by setting the arg variables. --- src/frontend/Dockerfile | 9 +++++++++ src/frontend/apps/impress/.env | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index 778648a9..de117166 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -61,6 +61,15 @@ FROM impress as impress-builder WORKDIR /home/frontend/apps/impress +ARG FRONTEND_THEME +ENV NEXT_PUBLIC_THEME=${FRONTEND_THEME} + +ARG SIGNALING_URL +ENV NEXT_PUBLIC_SIGNALING_URL=${SIGNALING_URL} + +ARG API_ORIGIN +ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN} + RUN yarn build # ---- Front-end image ---- diff --git a/src/frontend/apps/impress/.env b/src/frontend/apps/impress/.env index 6c2936d2..5c413314 100644 --- a/src/frontend/apps/impress/.env +++ b/src/frontend/apps/impress/.env @@ -1 +1,3 @@ NEXT_PUBLIC_THEME=dsfr +NEXT_PUBLIC_SIGNALING_URL= +NEXT_PUBLIC_API_ORIGIN=