From e8208772f1f809ecf285fb06182bcc6c7efde960 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 1 Nov 2024 07:40:06 +0530 Subject: [PATCH] fix: handle vite env variables --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index d7abca37..a03c84df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,10 @@ RUN npm run build:server FROM base AS frontend-build WORKDIR /app +# Define the environment variable to make it available at build time +ARG VITE_BACKEND_URL +ENV VITE_BACKEND_URL=$VITE_BACKEND_URL + # Copy frontend code and configs COPY src ./src COPY index.html ./index.html