Skip to content

Commit

Permalink
refactor(app): update docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
VanVorobyov committed Apr 1, 2024
1 parent 87d3855 commit 2581e33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Codepet deploy front
on:
push:
branches: ['main', 'develop']
branches: [ 'main', 'develop' ]
jobs:
build_and_push_to_docker_hub_frontend:
name: Push Docker image to DockerHub
Expand All @@ -24,6 +24,8 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME_FRONT }}/${{ secrets.PROJECT_NAME }}_frontend:latest
build-args: |
NEXT_PUBLIC_CAPTCHA_SITE_KEY=${{ secrets.NEXT_PUBLIC_CAPTCHA_SITE_KEY }}
NEXT_PUBLIC_BASE_DEV_URL=${{ secrets.NEXT_PUBLIC_BASE_DEV_URL }}
NEXT_PUBLIC_BASE_TEST_URL=${{ secrets.NEXT_PUBLIC_BASE_TEST_URL }}
deploy:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -60,6 +62,8 @@ jobs:
EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }}
NEXT_PUBLIC_CAPTCHA_SITE_KEY=${{ secrets.NEXT_PUBLIC_CAPTCHA_SITE_KEY }}
NEXT_PUBLIC_BASE_DEV_URL=${{ secrets.NEXT_PUBLIC_BASE_DEV_URL }}
NEXT_PUBLIC_BASE_TEST_URL=${{ secrets.NEXT_PUBLIC_BASE_TEST_URL }}
NEXT_SHARP_PATH=${{ secrets.NEXT_SHARP_PATH }}
_EOF_
- name: Copy docker-compose-prod.yaml via ssh
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/qa_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

name: Codepet QA_deploy front
on:
push:
branches: ['QA']
jobs:
build_and_push_to_docker_hub_frontend:
name: Push Docker image to DockerHub
name: Push Docker image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ RUN npm ci
COPY . .

ARG NEXT_PUBLIC_CAPTCHA_SITE_KEY
ARG NEXT_PUBLIC_BASE_DEV_URL
ARG NEXT_PUBLIC_BASE_TEST_URL

ENV NEXT_PUBLIC_CAPTCHA_SITE_KEY=$NEXT_PUBLIC_CAPTCHA_SITE_KEY
ENV NEXT_PUBLIC_BASE_DEV_URL=$NEXT_PUBLIC_BASE_DEV_URL
ENV NEXT_PUBLIC_BASE_TEST_URL=$NEXT_PUBLIC_BASE_TEST_URL

ENV NODE_ENV production

Expand Down

0 comments on commit 2581e33

Please sign in to comment.