mirror of
https://github.com/MrUnknownDE/bierkasten-casino.git
synced 2026-04-19 06:43:46 +02:00
28 lines
537 B
Docker
28 lines
537 B
Docker
# path: frontend/Dockerfile
|
|
# --- Build Stage ---
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install
|
|
|
|
COPY tsconfig.json vite.config.ts index.html ./
|
|
COPY src ./src
|
|
COPY public ./public
|
|
|
|
RUN npm run build
|
|
|
|
# --- Runtime Stage (NGINX) ---
|
|
FROM nginx:alpine
|
|
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
# Build-Ergebnis ins Webroot
|
|
COPY --from=build /app/dist ./
|
|
|
|
# NGINX-Konfiguration für SPA + Backend-Proxy
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"] |