修复path
All checks were successful
build and push / build-and-push (push) Successful in 1m30s

This commit is contained in:
编码猿
2025-10-07 03:34:31 +08:00
parent 473ccf2a45
commit 88cb2ae02b

View File

@@ -14,9 +14,8 @@ RUN npx vite build --base=/app-product/
FROM nginx:alpine FROM nginx:alpine
# 构建产物放到 /usr/share/nginx/html/app-product # 构建产物放到 /usr/share/nginx/html/app-product
# nginx.conf 也需要修改
COPY --from=builder /app/dist /usr/share/nginx/html/app-product COPY --from=builder /app/dist /usr/share/nginx/html/app-product
# 覆盖 Nginx 配置,支持 SPA 子路径 # 覆盖 Nginx 配置,支持 SPA 子路径
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]