From beb8c8dcbb244e190be1463e7ffb1f5896d31a16 Mon Sep 17 00:00:00 2001 From: choidabom <48302257+choidabom@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:51:44 +0900 Subject: [PATCH] Fix `Dockerfile` image build error (#367) * Fix Dockerfile path in docker-publish workflow * Fix docker-publish-latest.yaml * Change prisma schema generation command --- .github/workflows/base-docker-publish.yml | 2 +- .github/workflows/docker-publish-latest.yaml | 1 + Dockerfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/base-docker-publish.yml b/.github/workflows/base-docker-publish.yml index 36972ba9..eb5b780c 100644 --- a/.github/workflows/base-docker-publish.yml +++ b/.github/workflows/base-docker-publish.yml @@ -26,4 +26,4 @@ jobs: - name: Build & Push Image env: VERSION: ${{ inputs.version }} - run: docker buildx build --platform linux/amd64,linux/arm64 -t yorkieteam/codepair:$VERSION --push ./backend + run: docker buildx build --platform linux/amd64,linux/arm64 -t yorkieteam/codepair:$VERSION --push . diff --git a/.github/workflows/docker-publish-latest.yaml b/.github/workflows/docker-publish-latest.yaml index 1a6123a1..f44851b2 100644 --- a/.github/workflows/docker-publish-latest.yaml +++ b/.github/workflows/docker-publish-latest.yaml @@ -6,6 +6,7 @@ on: paths: - ".github/workflows/docker-publish-latest.yaml" - "backend/**" + - "Dockerfile" jobs: call-base-docker-publish: uses: ./.github/workflows/base-docker-publish.yml diff --git a/Dockerfile b/Dockerfile index 1e94bd80..524f811e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY . /usr/src/app WORKDIR /usr/src/app RUN sed -i 's/"prepare": "husky install"/"prepare": ""/' ./package.json RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile -RUN pnpm backend db:generate +RUN pnpx prisma generate --schema=./backend/prisma/schema.prisma RUN pnpm backend build RUN pnpm deploy --filter=backend --prod /prod/backend WORKDIR /prod/backend