fix(deploy): 支持 full-themes 六合一包部署并统一 shell 脚本 LF 换行
This commit is contained in:
@@ -12,6 +12,7 @@ NO_BUILD=false
|
||||
SKIP_BACKUP=false
|
||||
ALLOW_DEFAULT_SECRETS=false
|
||||
IMAGE_TAR=""
|
||||
WITH_THEMES=false
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
@@ -30,6 +31,7 @@ usage() {
|
||||
--pull 先执行 git pull --ff-only
|
||||
--images PATH 先 docker load 指定镜像 tar,并自动跳过本机构建
|
||||
--tag TAG 使用指定镜像 tag,并写入 .env.docker 的 IMAGE_TAG
|
||||
--themes 启用四套 player(player2/3/4);加载 thebet365-full-themes-*.tar 时自动开启
|
||||
--no-build 不构建镜像,直接使用服务器已有镜像
|
||||
--no-backup 跳过 PostgreSQL 与 uploads 备份
|
||||
--allow-default-secrets 允许 .env.docker 使用示例密钥,仅测试环境使用
|
||||
@@ -38,6 +40,7 @@ usage() {
|
||||
示例:
|
||||
./scripts/deploy-update.sh --pull
|
||||
./scripts/deploy-update.sh --images thebet365-images-v1.2.3.tar --tag v1.2.3
|
||||
./scripts/deploy-update.sh --images thebet365-full-themes-latest.tar --tag latest
|
||||
./scripts/deploy-update.sh --no-build
|
||||
EOF
|
||||
}
|
||||
@@ -57,6 +60,10 @@ while [ $# -gt 0 ]; do
|
||||
set_deploy_image_tag "${2:?缺少 --tag 参数值}"
|
||||
shift 2
|
||||
;;
|
||||
--themes)
|
||||
WITH_THEMES=true
|
||||
shift
|
||||
;;
|
||||
--no-build)
|
||||
NO_BUILD=true
|
||||
shift
|
||||
@@ -92,6 +99,12 @@ if [ -n "$IMAGE_TAR" ] && [ -z "${DEPLOY_IMAGE_TAG:-}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_THEMES" = true ]; then
|
||||
enable_themes_deploy
|
||||
elif [ -n "$IMAGE_TAR" ]; then
|
||||
maybe_enable_themes_from_tar "$IMAGE_TAR"
|
||||
fi
|
||||
|
||||
if [ "$PULL_CODE" = true ]; then
|
||||
require_command git
|
||||
log "拉取代码: git pull --ff-only"
|
||||
@@ -121,8 +134,9 @@ fi
|
||||
|
||||
run_prisma_migrations
|
||||
|
||||
log "启动/更新 api / player / admin"
|
||||
compose up -d api player admin
|
||||
log "启动/更新 $(stack_app_services)"
|
||||
# shellcheck disable=SC2046
|
||||
compose up -d $(stack_app_services)
|
||||
wait_for_stack_ready
|
||||
show_prisma_status
|
||||
compose ps
|
||||
|
||||
Reference in New Issue
Block a user