From beef8aef3ca9aacbbbe7e60aa7b422a9d62efa82 Mon Sep 17 00:00:00 2001 From: wilson Date: Sun, 1 Mar 2026 22:14:22 +0000 Subject: [PATCH] fix: use entrypoint.sh --- scripts/entrypoint.sh | 3 +++ web.Dockerfile | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 scripts/entrypoint.sh diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh new file mode 100644 index 0000000..2af7002 --- /dev/null +++ b/scripts/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh +npx prisma db push +exec node build diff --git a/web.Dockerfile b/web.Dockerfile index 5e3d884..29799e9 100644 --- a/web.Dockerfile +++ b/web.Dockerfile @@ -8,17 +8,19 @@ ENV CI=true RUN npm i -g pnpm RUN pnpm install --frozen-lockfile COPY . . -RUN pnpm prisma:push RUN pnpm build RUN pnpm prune --prod # Use another Node.js Alpine image for the final stage FROM node:24-alpine WORKDIR /app +COPY ./scripts/entrypoint.sh entrypoint.sh +RUN chmod +x entrypoint.sh COPY --from=builder /app/build build/ +COPY --from=builder /app/prisma prisma/ COPY --from=builder /app/node_modules node_modules/ COPY package.json . EXPOSE 3000 ENV NODE_ENV=production VOLUME /data -CMD [ "node", "build" ] +CMD [ "./entrypoint.sh" ]