File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 7171 tags : ${{ steps.meta.outputs.tags }}
7272 cache-from : type=gha
7373 cache-to : type=gha,mode=max
74+
75+ - name : Smoke test image content
76+ run : |
77+ IMG="${{ env.DOCKER_REPO }}:${IMAGE_TAG}"
78+ docker pull "$IMG"
79+ docker run --rm "$IMG" sh -lc 'test -f /usr/share/nginx/html/index.html && ls -lah /usr/share/nginx/html | head -n 50'
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RUN npm ci
1010COPY . .
1111
1212# 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
13+ RUN npm run build -- --configuration=production
1414
1515# ====== Runtime stage ======
1616FROM nginx:1.27-alpine
@@ -22,7 +22,7 @@ COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
2222RUN rm -rf /usr/share/nginx/html/*
2323
2424# copy artefact Angular
25- COPY --from=build /app/dist/app / /usr/share/nginx/html/
25+ COPY --from=build /app/dist/codecampus / /usr/share/nginx/html/
2626
2727EXPOSE 80
2828HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD wget -qO- http://localhost/ || exit 1
Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ server {
55 root /usr/share/nginx/html;
66 index index .html;
77
8+ # # Proxy API -> gateway-service
9+ # location /api/ {
10+ # proxy_pass http://gateway-service:8888/api/;
11+ # proxy_set_header Host $host;
12+ # proxy_set_header X-Real-IP $remote_addr;
13+ # proxy_http_version 1.1;
14+ # proxy_set_header Connection "";
15+ # }
16+
817 # Cache tĩnh nhẹ nhàng
918 location ~ * \.(?:js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
1019 try_files $uri =404 ;
Original file line number Diff line number Diff line change 1+ # các biến của bạn
2+ IMG=" "
3+
4+ docker rm -f codecampus-frontend 2> /dev/null || true
5+ docker run -d --name codecampus-frontend ^
6+ --restart unless-stopped ^
7+ -p 4200:80 ^
8+ yunomix2834/codecampus-frontend:latest
9+
10+ # kiểm tra
11+ docker logs -n 50 codecampus-frontend
12+ curl -I http://localhost:4200
You can’t perform that action at this time.
0 commit comments