From a5d4024edefbb6f1d9323bbd88318420a29d5fd0 Mon Sep 17 00:00:00 2001 From: icurfer Date: Tue, 22 Apr 2025 21:07:40 +0900 Subject: [PATCH] recently --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2aca7dc..a95c233 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ # Build stage FROM node:20.11 as builder +# Build arguments for React environment variables +ARG REACT_APP_API_AUTH +ARG REACT_APP_API_BLOG + # Set working directory WORKDIR /usr/src/app @@ -13,6 +17,10 @@ RUN npm install # Copy the rest of the application COPY . ./ +# Set env vars for React build (only works if passed as build-arg) +ENV REACT_APP_API_AUTH=$REACT_APP_API_AUTH +ENV REACT_APP_API_BLOG=$REACT_APP_API_BLOG + # Build the application RUN npm run build