This commit is contained in:
+5
-5
@@ -6,29 +6,29 @@ RUN corepack enable
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* ./
|
||||
|
||||
# System-Pakete für better-sqlite3 installieren
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
# Installation mit deiner funktionierenden Workspace-Konfiguration
|
||||
RUN pnpm i --frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
# Next.js exportiert im Standalone-Modus alles Nötige automatisch
|
||||
ENV NEXT_OUTPUT=standalone
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Kopiere die Standalone-Dateien
|
||||
# Kopiere die Standalone-Dateien (existieren jetzt dank der Next-Config)
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/public ./public
|
||||
# Kopiere die native SQLite-Datenbank (falls lokal vorhanden)
|
||||
COPY --from=builder /app/songs.db* ./
|
||||
|
||||
# Port-Zuweisung für Next.js (Standardmäßig 3000, intern im Container)
|
||||
EXPOSE 3000
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
||||
Reference in New Issue
Block a user