Skip to content

Commit b780971

Browse files
committed
Allow client .env into Docker build debug
1 parent 61e6d8c commit b780971

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci-docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ jobs:
103103
echo "FRONTEND_IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV
104104
echo "FRONTEND_VERSION=$VERSION" >> $GITHUB_ENV
105105
106-
docker build -f Dockerfile.frontend -t $IMAGE_ID:$VERSION -t $IMAGE_ID:latest .
106+
docker build -f Dockerfile.frontend \
107+
--build-arg VITE_API_BASE_URL=${{ secrets.FRONTEND_API_BASE_URL }} \
108+
-t $IMAGE_ID:$VERSION -t $IMAGE_ID:latest .
107109
108110
- name: Push frontend Docker image
109111
run: |

Dockerfile.frontend

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM node:20-alpine AS build
33

44
WORKDIR /app
55

6+
ARG VITE_API_BASE_URL
7+
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
8+
69
# Copy only package manifests first for better caching
710
COPY client/package*.json ./
811
RUN npm ci

0 commit comments

Comments
 (0)