arvind-git-code
commited on
Commit
·
25161d8
1
Parent(s):
c12d893
Update environment variable handling
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -11,10 +11,13 @@ COPY public/ ./public/
|
|
11 |
COPY src/ ./src/
|
12 |
COPY tsconfig.json ./
|
13 |
|
14 |
-
#
|
15 |
ARG REACT_APP_GEMINI_API_KEY
|
16 |
ENV REACT_APP_GEMINI_API_KEY=$REACT_APP_GEMINI_API_KEY
|
17 |
|
|
|
|
|
|
|
18 |
# Build the application
|
19 |
RUN npm run build
|
20 |
|
|
|
11 |
COPY src/ ./src/
|
12 |
COPY tsconfig.json ./
|
13 |
|
14 |
+
# Set environment variable
|
15 |
ARG REACT_APP_GEMINI_API_KEY
|
16 |
ENV REACT_APP_GEMINI_API_KEY=$REACT_APP_GEMINI_API_KEY
|
17 |
|
18 |
+
# Create .env file explicitly
|
19 |
+
RUN echo "REACT_APP_GEMINI_API_KEY=$REACT_APP_GEMINI_API_KEY" > .env
|
20 |
+
|
21 |
# Build the application
|
22 |
RUN npm run build
|
23 |
|