Skip to content

Commit

Permalink
fix(infra): update context path for cd-dev pipeline (#1543)
Browse files Browse the repository at this point in the history
* fix: update iris build context

* fix: update backend entrypoint path in dockerfile

* feat: update cd-prod also
  • Loading branch information
dotoleeoak authored Mar 5, 2024
1 parent 8de3ae0 commit 32b6376
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build and push image
uses: docker/build-push-action@v5
with:
file: ./apps/backend/Dockerfile
file: ./apps/backend/Dockerfile # build with root context
push: true
build-args: 'target=client'
tags: ghcr.io/${{ github.repository_owner }}/codedang-client-api:latest
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Build and push image
uses: docker/build-push-action@v5
with:
file: ./apps/backend/Dockerfile
file: ./apps/backend/Dockerfile # build with root context
push: true
build-args: 'target=admin'
tags: ghcr.io/${{ github.repository_owner }}/codedang-admin-api:latest
Expand All @@ -72,7 +72,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
context: '{{defaultContext}}:iris'
context: '{{defaultContext}}:apps/iris'
tags: ghcr.io/${{ github.repository_owner }}/codedang-iris:latest

run-server:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
context: '{{defaultContext}}:iris'
context: '{{defaultContext}}:apps/iris'
tags: ${{ steps.login-ecr.outputs.registry }}/codedang-iris:latest

deploy:
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ENV NODE_ENV=production
ENV TARGET=${target}

COPY --from=builder /build/out /app
COPY ./backend/entrypoint.sh /app
COPY ./apps/backend/entrypoint.sh /app
WORKDIR /app

ENTRYPOINT ["/app/entrypoint.sh"]

0 comments on commit 32b6376

Please sign in to comment.