Files
par/.dockerignore
mediabot-pt b24ec27905 perf: 优化 CI Docker 镜像构建速度
- 新增 CI 精简 Dockerfile,直接打包 drone 预编译 jar,避免在 Docker 内重复编译(省去 npm ci + mvn 全量编译 ~15min)
- build-docker-image 步骤改用精简 Dockerfile,去掉无效的 docker pull 缓存尝试
- maven-build 步骤优化:动态检测 CPU 核数设置并行度 -T 1C/2C、增加 JVM 内存、添加 --fail-at-end
- .dockerignore 优化:CI Dockerfile 仅需 par-api/target/*.jar,排除所有源码/pom/前端文件
- par-api/Dockerfile 标注为独立多阶段构建版本(本地使用)

参考 mediabot 项目的多阶段构建思路,但将编译前置到 drone host 缓存中,Docker 构建秒级完成
2026-06-29 12:53:33 +08:00

56 lines
742 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 构建产物(jar 除外 — CI Dockerfile 需要拷贝 par-api/target/*.jar)
web/node_modules/
web/dist/
par-common/target/
par-core/target/
# 注意:不排除 par-api/target/,因为 CI Dockerfile 需要其中的 jar
# IDE
.idea/
*.iml
.vscode/
.codebuddy/
# Git
.git/
.gitignore
.gitattributes
# 文档
README.md
docs/
# 数据与日志
data/
logs/
static/
# 脚本(不需要打包进镜像)
*.sh
deploy.sh
run.sh
# CI/CD
.drone.yml
docker-compose.yml
# 项目文件(Docker 上下文不需要)
pom.xml
par-*/pom.xml
# Java 源码(CI Dockerfile 不需要)
par-common/src/
par-core/src/
par-api/src/
# 前端源码(CI Dockerfile 不需要)
web/
# 其他
*.md
*.log
*.iml
*.class
*.jar
!par-api/target/*.jar