fix(docker): respect docker-compose.override.yml for user customizations (#44)

all compose file assembly points now include the override file last
when present, giving it highest precedence over other compose files
This commit is contained in:
Yury Kossakovsky
2026-02-27 19:05:50 -07:00
parent 19325191c3
commit 6a1301bfc0
5 changed files with 28 additions and 1 deletions

View File

@@ -353,6 +353,7 @@ get_dify_compose() {
}
# Build array of all active compose files (main + external services)
# Appends docker-compose.override.yml last if it exists (user overrides, highest precedence)
# IMPORTANT: Requires COMPOSE_PROFILES to be set before calling (via load_env)
# Usage: build_compose_files_array; docker compose "${COMPOSE_FILES[@]}" up -d
# Result is stored in global COMPOSE_FILES array
@@ -369,6 +370,12 @@ build_compose_files_array() {
if path=$(get_dify_compose); then
COMPOSE_FILES+=("-f" "$path")
fi
# Include user overrides last (highest precedence)
local override="$PROJECT_ROOT/docker-compose.override.yml"
if [ -f "$override" ]; then
COMPOSE_FILES+=("-f" "$override")
fi
}
#=============================================================================