fix(deploy): allow direct production deploy host prefix

This commit is contained in:
Xiaoxia AI
2026-06-22 07:15:02 +08:00
parent 02d8000202
commit d7ff0dceb1
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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"
+1
View File
@@ -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