mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
fix: add bcrypt native module rebuild to Dockerfile
bcrypt requires native compilation which was skipped by --ignore-scripts. Added python3/make/g++ and npm rebuild bcrypt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8660966c9e
commit
b2ef16eb28
1 changed files with 11 additions and 0 deletions
|
|
@ -9,8 +9,12 @@ RUN apk add --no-cache openssl
|
||||||
|
|
||||||
# --- Dependencies Stage ---
|
# --- Dependencies Stage ---
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
|
# Build-Tools fuer native Module (bcrypt)
|
||||||
|
RUN apk add --no-cache python3 make g++
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm ci --ignore-scripts
|
RUN npm ci --ignore-scripts
|
||||||
|
# Native Module kompilieren (bcrypt)
|
||||||
|
RUN npm rebuild bcrypt
|
||||||
# Prisma Generate braucht die Schema-Dateien
|
# Prisma Generate braucht die Schema-Dateien
|
||||||
COPY prisma ./prisma
|
COPY prisma ./prisma
|
||||||
RUN npx prisma generate --schema=prisma/core.schema.prisma
|
RUN npx prisma generate --schema=prisma/core.schema.prisma
|
||||||
|
|
@ -36,9 +40,16 @@ FROM base AS production
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
# Build-Tools fuer native Module (bcrypt)
|
||||||
|
RUN apk add --no-cache python3 make g++
|
||||||
|
|
||||||
# Nur Produktions-Dependencies
|
# Nur Produktions-Dependencies
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm ci --omit=dev --ignore-scripts
|
RUN npm ci --omit=dev --ignore-scripts
|
||||||
|
RUN npm rebuild bcrypt
|
||||||
|
|
||||||
|
# Build-Tools entfernen (Image klein halten)
|
||||||
|
RUN apk del python3 make g++
|
||||||
|
|
||||||
# Prisma Client generieren
|
# Prisma Client generieren
|
||||||
COPY prisma ./prisma
|
COPY prisma ./prisma
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue