Skip to content

Commit

Permalink
feat/#43/빌드 시 DOMAIN 주입
Browse files Browse the repository at this point in the history
  • Loading branch information
sukjuhong committed Jan 8, 2025
1 parent 189481e commit b26cdd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CD-web-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: 'Build and Push Container'
run: |-
DOCKER_TAG="${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.GAR_NAME }}/${{ env.SERVICE }}:${{ github.sha }}"
docker build --tag "${DOCKER_TAG}" .
docker build --tag "${DOCKER_TAG}" --build-arg NEXT_PUBLIC_API_URL=${{ secrets.POFO_DOMAIN }} .
docker push "${DOCKER_TAG}"
- name: 'Deploy to Cloud Run'
Expand All @@ -86,8 +86,6 @@ jobs:
# NOTE: If using a pre-built image, update the image name below:
image: '${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.GAR_NAME }}/${{ env.SERVICE }}:${{ github.sha }}'
flags: '--port=3000'
env_vars: |-
NEXT_PUBLIC_API_URL=${{ secrets.POFO_DOMAIN }}

# If required, use the Cloud Run URL output in later steps
- name: 'Show output'
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

FROM node:18-alpine AS base

ARG NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
Expand Down

0 comments on commit b26cdd1

Please sign in to comment.