From 90071ce495d08ea37aade8e2a5f40ceaa223b00b Mon Sep 17 00:00:00 2001 From: Xiaoxia AI Date: Mon, 22 Jun 2026 07:15:02 +0800 Subject: [PATCH] fix(deploy): allow direct production deploy host prefix --- infra/docker/deploy-production.sh | 2 +- tests/unit/test_release_scripts.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/docker/deploy-production.sh b/infra/docker/deploy-production.sh index 618341149..0f66470e8 100755 --- a/infra/docker/deploy-production.sh +++ b/infra/docker/deploy-production.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -HOST_PREFIX="${HOST_PREFIX:-/host}" +HOST_PREFIX="${HOST_PREFIX-/host}" ROOT_DIR="$HOST_PREFIX/var/lib/xiaoxia-saas-production/repo" COMPOSE_DIR="$ROOT_DIR/infra/docker" ENV_FILE="$HOST_PREFIX/var/lib/xiaoxia-saas-production/.env" diff --git a/tests/unit/test_release_scripts.py b/tests/unit/test_release_scripts.py index 4cefd858b..fffbf45bc 100644 --- a/tests/unit/test_release_scripts.py +++ b/tests/unit/test_release_scripts.py @@ -22,6 +22,7 @@ def test_gitea_production_deploy_uses_production_ports(): def test_deploy_production_uses_production_infra_and_project(): script = Path("infra/docker/deploy-production.sh").read_text(encoding="utf-8") + assert 'HOST_PREFIX="${HOST_PREFIX-/host}"' in script assert "xiaoxia-postgres-production" in script assert "xiaoxia-redis-production" in script assert "xiaoxia-postgres\n" not in script