From 0173a2b86606d8a9ad0ace555b7a3a90756a26b8 Mon Sep 17 00:00:00 2001 From: devmique Date: Tue, 3 Feb 2026 19:54:03 +0800 Subject: [PATCH 1/2] Add Docker Image CI workflow --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..3f53646d --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 7e1f5443ac46a9491df60794f012d586d9087e89 Mon Sep 17 00:00:00 2001 From: devmique Date: Tue, 3 Feb 2026 21:09:19 +0800 Subject: [PATCH 2/2] Update Dockerfile to include Prisma setup Added Prisma schema copying and client generation to Dockerfile. --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7a33e32f..56ee8ffe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,20 @@ COPY package*.json ./ # Install dependencies RUN npm install +# Copy Prisma schema first +COPY prisma ./prisma + +# Generate Prisma Client +RUN npx prisma generate + # Copy the rest of the application code COPY . . +# Prevent SWC binary download crash +ENV NEXT_DISABLE_SWC_DOWNLOAD=1 + # Generate Database -RUN npx prisma migrate dev --name init +#RUN npx prisma migrate dev --name init # Build the Next.js application RUN npm run build