update
This commit is contained in:
+6
-3
@@ -21,9 +21,12 @@ FROM nginx:alpine
|
||||
# 将构建产物复制到 Nginx 默认静态目录
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# 自定义 Nginx 配置:支持 SPA 路由 fallback + gzip
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Nginx 配置模板(支持 envsubst 环境变量替换)
|
||||
COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||
|
||||
EXPOSE 80
|
||||
# 默认后端 API 地址(运行时可通过 -e BACKEND_URL=... 覆盖)
|
||||
ENV BACKEND_URL=http://host.docker.internal:8000
|
||||
|
||||
EXPOSE 8901
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user