File tree Expand file tree Collapse file tree 4 files changed +54
-0
lines changed
Expand file tree Collapse file tree 4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ node_modules
2+ dist
3+ .vscode
4+ .DS_Store
5+ .git
6+ .gitignore
7+ npm-debug.log
8+ yarn-error.log
Original file line number Diff line number Diff line change 1+ # Étape 1 : Build Vue
2+ FROM node:22-alpine AS build
3+ WORKDIR /app
4+
5+ COPY package*.json ./
6+ RUN npm ci
7+
8+ COPY . .
9+ RUN npm run build
10+
11+ # Étape 2 : Serve avec Nginx
12+ FROM nginx:alpine
13+ # Copie du build Vue
14+ COPY --from=build /app/dist /usr/share/nginx/html
15+ # Copie de la config Nginx
16+ COPY nginx.conf /etc/nginx/conf.d/default.conf
17+
18+ EXPOSE 80
19+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 1+ version : " 3.8"
2+
3+ services :
4+ thecode :
5+ build : .
6+ image : thecode:latest
7+ container_name : thecode
8+ restart : unless-stopped
9+ ports :
10+ - " 127.0.0.1:8002:80" # hôte:container
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ server_name _;
4+
5+ root /usr/share/nginx/html;
6+ index index .html;
7+
8+ # Google verification exact
9+ location = /google8031792c6641dc1d.html {
10+ try_files $uri =404 ;
11+ }
12+
13+ # SPA fallback
14+ location / {
15+ try_files $uri /index .html;
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments