Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ jobs:
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin

- name: Build Docker image
run: docker build --pull -t ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend .
- name: Build Docker image with env
run: |
docker build --pull \
--build-arg VITE_BASE_SERVER_URL=${{ secrets.VITE_BASE_SERVER_URL }} \
-t ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend .

- name: Push Docker image
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/lockerit-frontend
Expand Down
5 changes: 3 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ FROM node:18 as build

WORKDIR /app

ARG VITE_BASE_SERVER_URL
ENV VITE_BASE_SERVER_URL=$VITE_BASE_SERVER_URL

COPY package*.json ./
RUN npm install

COPY .env.production .env.production

COPY . .
RUN npm run build -- --mode production

Expand Down