Files
tatort/Dockerfile
2025-04-10 15:04:53 +02:00

33 lines
770 B
Docker

# --- Build stage ---
FROM node:19 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:19-alpine3.16
COPY --from=build /usr/src/app .
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["sh", "-c", "ORIGIN=https://tatort.innovation-hub-niedersachsen.de node build/index.js"]