From df5da2acae66ae6889d79adb486af4be45e1411a Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Mon, 4 Dec 2023 14:44:28 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fproject?= =?UTF-8?q?/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 042590d..883fecb 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -3,11 +3,11 @@ FROM node:14 AS build WORKDIR /app -# Copier le fichier package.json et yarn.lock (ou package-lock.json si vous utilisez npm) +# Copier le fichier package.json et package-lock.json COPY package.json package-lock.json ./ # Installer les dépendances -RUN npm install --force +RUN npm install # Copier le reste des fichiers de l'application COPY . . @@ -15,19 +15,11 @@ COPY . . # Construire l'application RUN npm run build -# Étape 2 : Configurer Nginx et copier les fichiers construits -FROM nginx:alpine +# Étape 2 : Configurer Apache et copier les fichiers construits +FROM httpd:2.4-alpine # Copier les fichiers construits depuis l'étape précédente -COPY --from=build /app/build /usr/share/nginx/html +COPY --from=build /app/build/ /usr/local/apache2/htdocs/ -RUN cat nginx.conf - -# Copier la configuration personnalisée pour Nginx (si nécessaire) -COPY nginx.conf /etc/nginx/conf.d/default.conf - -# Exposer le port 80 +# Exposer le port 80 (par défaut pour Apache) EXPOSE 80 - -# Commande pour démarrer Nginx lorsqu'un conteneur basé sur cette image est lancé -CMD ["nginx", "-g", "daemon off;"]