Compare commits

..

2 Commits

Author SHA1 Message Date
DanielS
e1a555d4f9 Fix duplicate next.config copy in Dockerfile
Some checks failed
Staging Build / build (push) Failing after 1m30s
2026-06-22 23:29:29 +02:00
DanielS
8bf59b20f6 Make public copy flexible with wildcard in Dockerfile 2026-06-22 23:29:06 +02:00

View File

@@ -21,16 +21,20 @@ FROM node:20-alpine AS runner
WORKDIR /app WORKDIR /app
# Copy only the built assets and runtime dependencies from the builder
# Copy only built assets and runtime dependencies # Copy only built assets and runtime dependencies
COPY --from=builder /app/.next ./.next COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
# KORREKTUR: Kopiert den public-Ordner nur, wenn er wirklich existiert
COPY --from=builder /app/public* ./public
COPY --from=builder /app/package*.json ./ COPY --from=builder /app/package*.json ./
# KORREKTUR: Flexibles Kopieren der Next-Konfiguration (egal ob .js oder .mjs) # KORREKTUR: Flexibles Kopieren der Next-Konfiguration (egal ob .js oder .mjs)
COPY --from=builder /app/next.config.* ./ COPY --from=builder /app/next.config.* ./
# Optionale TS-Dateien (nur kopieren, wenn vorhanden, blockiert den Build nicht mehr) # Optionale TS-Dateien (nur kopieren, wenn vorhanden, blockiert den Build nicht mehr)
COPY --from=builder /app/tsconfig.json ./ 2>/dev/null || true COPY --from=builder /app/tsconfig.json ./ 2>/dev/null || true
COPY --from=builder /app/next-env.d.ts ./ 2>/dev/null || true COPY --from=builder /app/next-env.d.ts ./ 2>/dev/null || true
COPY --from=builder /app/tsconfig.json ./ 2>/dev/null || true
COPY --from=builder /app/next-env.d.ts ./ 2>/dev/null || true
# Install production dependencies (already installed in builder, but ensure they are present) # Install production dependencies (already installed in builder, but ensure they are present)
RUN npm ci --omit=dev RUN npm ci --omit=dev