Mirror of https://forge.levinkeller.de/levin/dorfarchiv.git
153e29ff47372717ae50357fb96b7db879718549
18 lines · 470 B
| 1 | # --- Stage 1: Build the static Docusaurus site --- |
| 2 | FROM node:22-alpine AS build |
| 3 | WORKDIR /app |
| 4 | |
| 5 | # Abhängigkeiten zuerst (Layer-Cache) |
| 6 | COPY package.json package-lock.json* ./ |
| 7 | RUN npm ci |
| 8 | |
| 9 | # Quellcode kopieren und statisch bauen |
| 10 | COPY . . |
| 11 | RUN npm run build |
| 12 | |
| 13 | # --- Stage 2: Serve build/ via nginx --- |
| 14 | FROM nginx:alpine AS runtime |
| 15 | COPY nginx.conf /etc/nginx/conf.d/default.conf |
| 16 | COPY --from=build /app/build /usr/share/nginx/html |
| 17 | EXPOSE 8080 |
| 18 | CMD ["nginx", "-g", "daemon off;"] |