- New VerantwortlicheInvite model: LT-issued invites so a person can register as Gemeinde Verantwortliche(r) for a specific Gemeinde, skipping the self-registration approval step. - Wahl/Workshop/Teilnehmer gain phase support (phasenAnzahl, beschreibung), mirroring the WP plugin's multi-phase elections. Teilnehmer unique constraint now scoped per phase. - Auth: team login + guest auth adjustments, spec coverage. - sync.service.ts: register VerantwortlicheInvite as a synced model. - wahl.service.ts: submitTeilnehmer updated for the new phase-scoped unique key. - client: login/home screen rework, new theme.dart, FCM web tweaks. - .gitignore: ignore .DS_Store. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
1.5 KiB
Docker
37 lines
1.5 KiB
Docker
# syntax=docker/dockerfile:1
|
|
#
|
|
# The Flutter web bundle is built on the HOST (it needs a ~2.8 GB SDK image
|
|
# otherwise). Before `docker compose build`, run:
|
|
# (cd client/app && flutter build web --release)
|
|
# This Dockerfile just copies client/app/build/web into the runtime image.
|
|
|
|
# --- 1. Backend build ---------------------------------------------------------
|
|
FROM node:20-bookworm-slim AS api-build
|
|
WORKDIR /src
|
|
# Prisma detects the OpenSSL version at `generate` time to pick the matching
|
|
# query engine binary; without OpenSSL present here it silently defaults to
|
|
# openssl-1.1.x, which then fails to load in the runtime stage (openssl 3.0.x).
|
|
RUN apt-get update && apt-get install -y --no-install-recommends openssl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY backend/package.json backend/package-lock.json ./
|
|
RUN npm ci
|
|
COPY backend/ ./
|
|
RUN npx prisma generate && npm run build
|
|
|
|
# --- 2. Runtime -------------------------------------------------------------
|
|
FROM node:20-bookworm-slim AS runtime
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
# Prisma needs OpenSSL at runtime.
|
|
RUN apt-get update && apt-get install -y --no-install-recommends openssl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=api-build /src/node_modules ./node_modules
|
|
COPY --from=api-build /src/dist ./dist
|
|
COPY --from=api-build /src/prisma ./prisma
|
|
# Pre-built Flutter web bundle from the host; app.module reads WEB_CLIENT_DIR.
|
|
COPY client/app/build/web ./web
|
|
ENV WEB_CLIENT_DIR=/app/web
|
|
EXPOSE 3000
|
|
# Apply pending migrations, then boot.
|
|
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main.js"]
|