diff --git a/infra/docker/deploy-production.sh b/infra/docker/deploy-production.sh index 802280ab1..68adbd68b 100644 --- a/infra/docker/deploy-production.sh +++ b/infra/docker/deploy-production.sh @@ -1,9 +1,10 @@ #!/bin/sh set -eu -ROOT_DIR="/var/lib/xiaoxia-saas-production/repo" +# 容器内路径(通过 -v /:/host 映射) +ROOT_DIR="/host/var/lib/xiaoxia-saas-production/repo" COMPOSE_DIR="$ROOT_DIR/infra/docker" -ENV_FILE="/var/lib/xiaoxia-saas-production/.env" +ENV_FILE="/host/var/lib/xiaoxia-saas-production/.env" cd "$ROOT_DIR" cp "$ENV_FILE" "$ROOT_DIR/.env" diff --git a/infra/docker/deploy-staging.sh b/infra/docker/deploy-staging.sh index 0f29e838f..795df5e5d 100644 --- a/infra/docker/deploy-staging.sh +++ b/infra/docker/deploy-staging.sh @@ -1,9 +1,10 @@ #!/bin/sh set -eu -ROOT_DIR="/var/lib/xiaoxia-saas-staging/repo" +# 容器内路径(通过 -v /:/host 映射) +ROOT_DIR="/host/var/lib/xiaoxia-saas-staging/repo" COMPOSE_DIR="$ROOT_DIR/infra/docker" -ENV_FILE="/var/lib/xiaoxia-saas-staging/.env" +ENV_FILE="/host/var/lib/xiaoxia-saas-staging/.env" cd "$ROOT_DIR" cp "$ENV_FILE" "$ROOT_DIR/.env"