chore(docker): 瘦身构建上下文避免生产磁盘不足
.dockerignore 排除 dist 除 standalone/static 外的开发与缓存产物 (dev/cache/server/node_modules 等)及服务器 dist_backup_* 备份目录, 将 docker 构建上下文从约 4.4G 降至约 200M,修复生产容器重建时 "no space left on device" 失败。
This commit was merged in pull request #22.
This commit is contained in:
@@ -30,3 +30,12 @@ scripts.backup
|
||||
logs
|
||||
*.tar.gz
|
||||
tsconfig.tsbuildinfo
|
||||
# --- 构建上下文瘦身 ---
|
||||
# dist 仅 Dockerfile.prod 需要 standalone 与 static 两个子目录,
|
||||
# 其余(dev/cache/server/node_modules 等开发与缓存产物)会撑大构建上下文,
|
||||
# 导致服务器磁盘不足(no space left on device),全部排除。
|
||||
dist/*
|
||||
!dist/standalone
|
||||
!dist/static
|
||||
# 服务器上的 dist 版本备份目录(每个约 1.1G),不得进入构建上下文
|
||||
dist_backup_*
|
||||
|
||||
Reference in New Issue
Block a user