Files
gameovergne-app/client/Dockerfile

32 lines
688 B
Docker

# ======================
# 1) Build Angular
# ======================
FROM node:20 AS build
WORKDIR /app
# Dépendances
COPY package*.json ./
RUN npm ci
# Sources
COPY . .
# Build prod Angular (utilise angular.json -> outputPath: dist/client)
RUN npm run build
# ======================
# 2) NGINX final
# ======================
FROM nginx:stable
# On remplace complètement le contenu par le build Angular
# ⚠️ IMPORTANT : Angular 18 + builder "application" -> dist/client (pas /browser)
COPY --from=build /app/dist/client/ /usr/share/nginx/html/
# Conf Nginx custom (SPA + proxy /ps)
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]