Fix Dockerfile: copy prisma schema before npm ci to fix postinstall

This commit is contained in:
2026-02-17 23:45:36 +00:00
parent 65ea7ac180
commit 50cbcb1634

View File

@@ -9,8 +9,9 @@ FROM base AS deps
RUN apk add --no-cache libc6-compat python3 make g++ RUN apk add --no-cache libc6-compat python3 make g++
WORKDIR /app WORKDIR /app
# Copy package files # Copy package files AND prisma schema (needed for postinstall: prisma generate)
COPY package*.json ./ COPY package*.json ./
COPY prisma ./prisma/
# Install dependencies (with legacy peer deps for compatibility) # Install dependencies (with legacy peer deps for compatibility)
RUN npm ci --legacy-peer-deps RUN npm ci --legacy-peer-deps
@@ -57,6 +58,3 @@ EXPOSE 3000
ENV PORT=3000 ENV PORT=3000
ENV HOSTNAME="0.0.0.0" ENV HOSTNAME="0.0.0.0"
# Start the application
CMD ["node", "server.js"]