add
This commit is contained in:
17
frontend/asset-assistant-system/Dockerfile
Normal file
17
frontend/asset-assistant-system/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
# 生产阶段:使用指定版本的 Nginx Alpine 镜像(大小写统一)
|
||||
FROM nginx:1.29.3-alpine AS production-stage
|
||||
|
||||
# 清除 Nginx 默认静态文件
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# 复制项目所有文件到 Nginx 静态文件目录(适配你的项目结构)
|
||||
COPY . /usr/share/nginx/html
|
||||
|
||||
# 复制自定义 Nginx 配置(解决 SPA 路由刷新 404 问题,必须添加)
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露 80 端口
|
||||
EXPOSE 80
|
||||
|
||||
# 启动 Nginx(前台运行)
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user