fix: use entrypoint.sh

This commit is contained in:
wilson 2026-03-01 22:14:22 +00:00
parent 9f909d1b09
commit beef8aef3c
2 changed files with 7 additions and 2 deletions

3
scripts/entrypoint.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
npx prisma db push
exec node build

View file

@ -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" ]