Prepare Kalendartool for MPM and disable invites

This commit is contained in:
Kühn
2026-10-08 15:06:22 +02:00
parent bc49c3074e
commit 556202575e
50 changed files with 905 additions and 836 deletions

View File

@@ -5,6 +5,11 @@
# zurueck und der Client kann nicht initialisiert werden.
FROM node:20-bookworm-slim AS builder
WORKDIR /app
ARG HUB_BASE_PATH=""
ARG MPM_AUTH_MODE="false"
ENV HUB_BASE_PATH=${HUB_BASE_PATH}
ENV MPM_AUTH_MODE=${MPM_AUTH_MODE}
ENV NEXT_PUBLIC_APP_BASE_PATH=${HUB_BASE_PATH}
COPY package.json package-lock.json ./
# ci statt install: reproduzierbarer Build aus dem Lockfile
@@ -50,16 +55,13 @@ COPY --from=builder --chown=nextjs:nodejs /app/node_modules/@prisma ./node_modul
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
# bcryptjs fuer das Admin-Seed-Script (manuell ausfuehrbar, nicht beim Start)
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/bcryptjs ./node_modules/bcryptjs
COPY --from=builder --chown=nextjs:nodejs /app/container-entrypoint.cjs ./container-entrypoint.cjs
COPY --from=builder --chown=nextjs:nodejs /app/module-runtime.js ./module-runtime.js
COPY --from=builder --chown=nextjs:nodejs /app/platform-module-sdk.cjs ./platform-module-sdk.cjs
USER nextjs
EXPOSE 3000
EXPOSE 3000 41030
# Migrationen beim Start anwenden, optional Admin seeden, dann Server starten.
# prisma migrate deploy ist idempotent und sicher fuer wiederholte Starts.
# Das Seed-Script ist NICHT-destruktiv: Es legt den Admin nur an, wenn
# noch keiner existiert (First-Run-Detection). Bestehende User werden
# niemals geloescht. Wenn SEED_ADMIN_* nicht gesetzt sind, laeuft es
# ohne Nebeneffekte durch.
# Direkter node-Aufruf statt npx: im Standalone-Output existiert
# node_modules/.bin nicht, daher wuerde "npx prisma" mit "not found" fehlschlagen.
CMD ["sh", "-c", "node node_modules/prisma/build/index.js migrate deploy && node prisma/seed-admin.cjs && node server.js"]
# Der gemeinsame Entrypoint setzt die Datenbankverbindung, wendet
# Migrationen an und startet anschließend Standalone- oder MPM-Betrieb.
CMD ["node", "container-entrypoint.cjs"]