This commit is contained in:
+9
-13
@@ -3,19 +3,12 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN npm install -g pnpm@10.26.1
|
RUN npm install -g pnpm@10.26.1
|
||||||
|
|
||||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
# 1. Zuerst ALLE Projektdateien kopieren (behebt das Rollup-Problem)
|
||||||
COPY lib/db/package.json lib/db/
|
|
||||||
COPY lib/api-spec/package.json lib/api-spec/
|
|
||||||
COPY lib/api-zod/package.json lib/api-zod/
|
|
||||||
COPY lib/api-client-react/package.json lib/api-client-react/
|
|
||||||
COPY scripts/package.json scripts/
|
|
||||||
COPY artifacts/api-server/package.json artifacts/api-server/
|
|
||||||
COPY artifacts/toolrate/package.json artifacts/toolrate/
|
|
||||||
COPY artifacts/mockup-sandbox/package.json artifacts/mockup-sandbox/
|
|
||||||
|
|
||||||
RUN pnpm install --no-frozen-lockfile --force
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# 2. Frisch installieren passend zur aktuellen Alpine-Architektur
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
ENV BASE_PATH=/
|
ENV BASE_PATH=/
|
||||||
RUN pnpm --filter @workspace/api-server --filter @workspace/toolrate -r --if-present run build
|
RUN pnpm --filter @workspace/api-server --filter @workspace/toolrate -r --if-present run build
|
||||||
|
|
||||||
@@ -24,6 +17,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN npm install -g pnpm@10.26.1
|
RUN npm install -g pnpm@10.26.1
|
||||||
|
|
||||||
|
# Im Runner-Stage kopieren wir nur die Paketdateien für die Prod-Installation
|
||||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
||||||
COPY lib/db/package.json lib/db/
|
COPY lib/db/package.json lib/db/
|
||||||
COPY lib/api-spec/package.json lib/api-spec/
|
COPY lib/api-spec/package.json lib/api-spec/
|
||||||
@@ -32,8 +26,10 @@ COPY lib/api-client-react/package.json lib/api-client-react/
|
|||||||
COPY artifacts/api-server/package.json artifacts/api-server/
|
COPY artifacts/api-server/package.json artifacts/api-server/
|
||||||
COPY artifacts/toolrate/package.json artifacts/toolrate/
|
COPY artifacts/toolrate/package.json artifacts/toolrate/
|
||||||
|
|
||||||
RUN pnpm install --no-frozen-lockfile --prod --force
|
# Produktions-Abhängigkeiten installieren
|
||||||
|
RUN pnpm install --frozen-lockfile --prod
|
||||||
|
|
||||||
|
# Kompilierte Artefakte aus dem Builder holen
|
||||||
COPY --from=builder /app/lib/db/dist lib/db/dist
|
COPY --from=builder /app/lib/db/dist lib/db/dist
|
||||||
COPY --from=builder /app/artifacts/api-server/dist artifacts/api-server/dist
|
COPY --from=builder /app/artifacts/api-server/dist artifacts/api-server/dist
|
||||||
COPY --from=builder /app/artifacts/toolrate/dist artifacts/toolrate/dist
|
COPY --from=builder /app/artifacts/toolrate/dist artifacts/toolrate/dist
|
||||||
|
|||||||
Reference in New Issue
Block a user