STOP tracking Dockerfile

This commit is contained in:
2026-03-25 19:55:48 +01:00
parent 310bec2d74
commit 8deab8fa68
2 changed files with 1 additions and 38 deletions

2
.gitignore vendored
View File

@@ -23,4 +23,4 @@ pnpm-debug.log*
*.sw?
#dockerfile
dockerfile
Dockerfile

View File

@@ -1,37 +0,0 @@
# Étape 1 : Construction (Build)
FROM node:20-slim AS build-stage
# Définit le dossier de travail
WORKDIR /app
# Copie les fichiers de dépendances
COPY package*.json ./
# Installe les dépendances
RUN npm install
# Copie le reste des fichiers du projet
COPY . .
# Construit l'application pour la production
RUN npm run build
# Étape 2 : Serveur de production (Nginx)
FROM nginx:stable-alpine AS production-stage
# Copie les fichiers compilés depuis l'étape de build
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Ajoute une configuration Nginx simple pour gérer le routage Vue (SPA)
RUN echo 'server { \
listen 80; \
location / { \
root /usr/share/nginx/html; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]