File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,19 @@ RUN npm ci
88
99# Copy source & build
1010COPY . .
11- # Angular 19 đã default prod; nhưng dùng cấu hình production vẫn OK
12- RUN npm run build
11+
12+ # Build production và cố định output-path để tránh lệ thuộc tên project
13+ RUN npm run build -- --configuration=production --output-path=dist/app
1314
1415# ====== Runtime stage ======
1516FROM nginx:1.27-alpine
17+
1618# file Nginx phục vụ SPA & fallback
1719COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
20+
1821# copy artefact Angular
19- COPY --from=build /app/dist/codecampus /usr/share/nginx/html
22+ COPY --from=build /app/dist/app /usr/share/nginx/html
2023
2124EXPOSE 80
25+ HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD wget -qO- http://localhost/ || exit 1
2226CMD ["nginx" , "-g" , "daemon off;" ]
You can’t perform that action at this time.
0 commit comments