# --- Build stage --- FROM node:22-bullseye AS build ENV NODE_ENV=production ENV ORIGIN=https://tatort.innovation-hub-niedersachsen.de ENV PNPM_HOME="/usr/local/lib/node_modules/pnpm" ENV PATH="$PNPM_HOME:$PATH" # Setze den Arbeitsverzeichnis im Container WORKDIR /usr/src/app # Installiere pnpm RUN npm install -g pnpm # Kopiere package.json und pnpm-lock.yaml in das Arbeitsverzeichnis COPY package.json pnpm-lock.yaml ./ # Installiere die Abhängigkeiten RUN pnpm install # Kopiere den Rest der Anwendung in das Arbeitsverzeichnis COPY . ./ RUN pnpm run build # --- Production stage --- FROM node:22-bullseye AS production WORKDIR /usr/src/app COPY package.json pnpm-lock.yaml ./ RUN pnpm install --production COPY --from=build /usr/src/appi/dist ./dist ENV HOST=0.0.0.0 EXPOSE 3000 CMD ["sh", "-c", "ORIGIN=https://tatort.innovation-hub-niedersachsen.de node build/index.js"]