fix: isolate backend compose project

This commit is contained in:
wlx committed 2026-08-07 12:50:57 +08:00
1 parent ac0d3856f0
commit 78d06d0ba0
3 files changed
+43 -5

No files matched your search

+11 -1
View File
@@ -22,7 +22,17 @@ env_value() {
backend_bind_address="$(env_value BACKEND_BIND_ADDRESS)"
backend_host_port="$(env_value BACKEND_HOST_PORT)"
oss_public_endpoint="$(env_value OSS_PUBLIC_ENDPOINT)"
compose_command=(docker compose --env-file "$env_file" -f "$compose_file")
project_name="$(env_value BACKEND_COMPOSE_PROJECT_NAME)"
if [[ -z "$project_name" || "$project_name" == "$(env_value COMPOSE_PROJECT_NAME)" ]]; then
printf 'BACKEND_COMPOSE_PROJECT_NAME must be set and differ from the infrastructure project.\n' >&2
exit 1
fi
compose_command=(
docker compose
--project-name "$project_name"
--env-file "$env_file"
-f "$compose_file"
)
"${compose_command[@]}" config --quiet