Initial: Privacy Gateway Projekt mit Team-Implementierung
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Dockerfile für den Anonymizer Service
|
||||
# Läuft im Backend-Container oder standalone
|
||||
|
||||
FROM node:20-alpine AS base
|
||||
|
||||
# Installiere nötige Pakete
|
||||
RUN apk add --no-cache dumb-init
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiere Package-Dateien
|
||||
COPY package.json tsconfig.json ./
|
||||
|
||||
# Installiere Dependencies
|
||||
RUN npm ci --only=production
|
||||
|
||||
# Dev-Stage für Entwicklung
|
||||
FROM base AS dev
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["dumb-init", "npm", "run", "dev"]
|
||||
|
||||
# Production-Stage
|
||||
FROM base AS production
|
||||
|
||||
# Kopiere kompilierte Dateien (von Build-Stage)
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
USER node
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["dumb-init", "node", "dist/index.js"]
|
||||
|
||||
# Builder-Stage (wird für Production benötigt)
|
||||
FROM base AS builder
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
Reference in New Issue
Block a user