build-flow.api/.dockerignore
xiangning 61e106415b feat(cicd): 接入自动触发 + docker compose 部署
- Jenkinsfile: 加 GenericTrigger(token=buildflow-api),Gitea push 自动触发构建
- Jenkinsfile: 部署 stage 改 docker compose(原 docker run),去 try/catch 吞异常
- Jenkinsfile: HealthCheck 改轮询(最多60s),失败标 unstable 不再静默
- .dockerignore: 排除 appsettings.Secrets.json + bin/obj,防止密钥进镜像

链路:Gitea push → generic-webhook-trigger → Jenkins build → Harbor → cd-target compose up
2026-07-17 14:45:46 +08:00

30 lines
589 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.

# BuildFlow API .dockerignore
# 目标:让 docker build 只把源码进镜像,排除密钥/产物/IDE 文件
# 密钥靠容器启动时 volume 挂载 appsettings.Secrets.json 注入,绝不进镜像
# 🔒 密钥与机密配置(最重要:防止明文密码进镜像)
**/appsettings.Secrets.json
**/appsettings.*.Secrets.json
**/secrets.json
# 构建产物(镜像内会重新 dotnet publish,无需带旧产物)
**/bin/
**/obj/
# Git 与 IDE
.git/
.gitignore
.vscode/
.idea/
*.user
*.suo
# 系统与日志
.DS_Store
*.log
*.tmp
# 文档(镜像不需要)
*.md
docs/