fix(frontend): droit d'accès au fichier de config de nginx, réduction de code smells

This commit is contained in:
ineszang44
2026-09-16 15:12:04 +02:00
parent 1c6b6105bd
commit 06cb60463c
+5 -8
View File
@@ -3,17 +3,14 @@
# ================== # ==================
# Image pour frontend # Image pour frontend
FROM dhi.io/node:24-alpine3.22 AS builder FROM node:24-alpine3.22 AS builder
WORKDIR /app WORKDIR /app
# Installation des dépendances du projet avec npm
RUN npm ci
COPY package.json package-lock.json* ./ COPY package.json package-lock.json* ./
# Installation des dépendances du projet avec npm
RUN npm ci
# Copie du code source vers le conteneur # Copie du code source vers le conteneur
COPY . . COPY . .
@@ -29,10 +26,10 @@ RUN npm run build
FROM dhi.io/nginx:1.28.0-alpine3.21-dev AS runner FROM dhi.io/nginx:1.28.0-alpine3.21-dev AS runner
# Copie de la configuration de nginx # Copie de la configuration de nginx
COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf COPY --chown=root:root --chmod=755 nginx.conf /etc/nginx/nginx.conf
# Copy the static build output from the build stage to Nginx's default HTML serving directory # Copy the static build output from the build stage to Nginx's default HTML serving directory
COPY --chown=nginx:nginx --from=builder /app/dist/*/browser /usr/share/nginx/html COPY --chown=root:root --chmod=755 --from=builder /app/dist/*/browser /usr/share/nginx/html
# Create necessary directories with proper permissions for nginx # Create necessary directories with proper permissions for nginx
RUN mkdir -p /var/log/nginx /var/cache/nginx && \ RUN mkdir -p /var/log/nginx /var/cache/nginx && \