mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
- 重构 Dockerfile 支持本地完整源码构建流程 - 添加 CI 专用的 Dockerfile.ci 使用预构建产物 - 创建 .dockerignore 和 .dockerignore.ci 文件优化构建上下文 - 添加 build-docker.sh 和 build-docker.bat 本地构建脚本 - 更新 GitHub Actions 工作流支持 Node.js 环境和 pnpm 依赖管理 - 添加 DOCKER.md 详细说明文档 - 优化 nginx 配置和端口暴露设置
20 lines
491 B
Docker
20 lines
491 B
Docker
# GitHub Actions 构建用的 Dockerfile
|
|
# 使用预构建的产物,不包含源代码构建过程
|
|
|
|
FROM nginx:alpine
|
|
|
|
# 复制 nginx 配置文件
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# 清理默认的 nginx 静态文件
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
# 复制构建产物到 nginx 静态文件目录
|
|
# 这里的 docs 目录是在 GitHub Actions 中构建生成的
|
|
COPY docs /usr/share/nginx/html
|
|
|
|
# 暴露端口
|
|
EXPOSE 80
|
|
|
|
# 启动 nginx
|
|
CMD ["nginx", "-g", "daemon off;"] |