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;"]