Skip to content

Commit 084e2e1

Browse files
authored
Merge pull request #92 from Locker-It/fix/update-docker-file
update docker file and actions file
2 parents 231c860 + 1443fe6 commit 084e2e1

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
- name: Log in to Docker Hub
1616
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
1717

18-
- name: Build Docker image
19-
run: docker build --pull -t ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend .
18+
- name: Build Docker image with env
19+
run: |
20+
docker build --pull \
21+
--build-arg VITE_BASE_SERVER_URL=${{ secrets.VITE_BASE_SERVER_URL }} \
22+
-t ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend .
2023
2124
- name: Push Docker image
2225
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend

dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ FROM node:18 as build
22

33
WORKDIR /app
44

5+
ARG VITE_BASE_SERVER_URL
6+
ENV VITE_BASE_SERVER_URL=$VITE_BASE_SERVER_URL
7+
58
COPY package*.json ./
69
RUN npm install
710

8-
COPY .env.production .env.production
9-
1011
COPY . .
1112
RUN npm run build -- --mode production
1213

0 commit comments

Comments
 (0)