fix: skip test image in production deploy

This commit is contained in:
yml2213
2026-08-30 22:17:09 +08:00
parent c6b5fc63ad
commit bc02018719
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -64,8 +64,9 @@ cmd_deploy() {
mkdir -p data logs
# 构建并启动
echo "正在构建镜像(首次构建约3-5分钟)..."
$COMPOSE build
echo "正在构建应用镜像(首次构建约3-5分钟)..."
# 生产部署不构建含大型开发依赖的 test 镜像;测试镜像仅在本地按需构建。
$COMPOSE build douyu-login
echo ""
echo "正在启动服务..."
+2
View File
@@ -2,6 +2,8 @@ services:
douyu-login:
build:
context: .
# 生产服务只构建 runtime 阶段;test 阶段仅供本地回归测试。
target: runtime
args:
# 服务器默认走阿里云镜像;本地测试设为 false。
USE_CHINA_MIRRORS: ${USE_CHINA_MIRRORS:-true}