Skip to content

Commit

Permalink
VPS - Added docker args
Browse files Browse the repository at this point in the history
  • Loading branch information
vladokuskov committed Jun 8, 2024
1 parent a96bf6b commit 6e5ec19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ jobs:

- name: Build Docker image 🐳
run: |
docker build --build-arg PORT=8081 -f docker/app.Dockerfile .
docker build /
--build-arg PORT=8081 /
-f docker/app.Dockerfile .
2 changes: 2 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- name: Build Docker image 🐳
run: |
docker build \
--build-arg NEXT_PUBLIC_APP_SERVER_URL=${{ secrets.APP_SERVER_URL }} \
--build-arg NODE_ENV=production \
-f docker/app.Dockerfile \
-t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_PROD_IMAGE_NAME }}:latest \
.
Expand Down
5 changes: 5 additions & 0 deletions docker/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ COPY package*.json ./
RUN yarn install

FROM base as builder
ARG NEXT_PUBLIC_APP_SERVER_URL
ARG NODE_ENV

ENV NEXT_PUBLIC_APP_SERVER_URL=$NEXT_PUBLIC_APP_SERVER_URL
ENV NODE_ENV=$NODE_ENV

WORKDIR /app
COPY . .
Expand Down

0 comments on commit 6e5ec19

Please sign in to comment.