File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ FROM nginx:1.21.5-alpine AS production
2222
2323# Copier les fichiers de build depuis l'étape de build
2424COPY --from=build /app/dist /usr/share/nginx/html
25+ COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
2526
2627# Exposer le port 80
2728EXPOSE 80
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ root /usr/share/nginx/html;
4+
5+ # Compression
6+ gzip on;
7+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
8+
9+ location / {
10+ try_files $uri $uri / /index .html;
11+ add_header Cache-Control "no-store, no-cache, must-revalidate" ;
12+ }
13+
14+ # Static assets caching
15+ location /assets {
16+ expires 1y ;
17+ add_header Cache-Control "public" ;
18+ access_log off;
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments