fix(deploy): allow direct production deploy host prefix
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user