|
@ -79,9 +79,8 @@ compose:get-compose-yml() { |
|
|
:cache: scope=session |
|
|
:cache: scope=session |
|
|
|
|
|
|
|
|
local path |
|
|
local path |
|
|
[ -e "/etc/compose/local.conf" ] && . "/etc/compose/local.conf" |
|
|
|
|
|
|
|
|
|
|
|
path=${DEFAULT_COMPOSE_FILE:-/etc/compose/compose.yml} |
|
|
|
|
|
|
|
|
path=$(DEBUG=1 DRY_RUN=1 compose 2>&1 | egrep '^\s+-e HOST_COMPOSE_YML_FILE=' | cut -f 2- -d "=" | cut -f 1 -d " ") |
|
|
|
|
|
|
|
|
[ -e "$path" ] || return 1 |
|
|
[ -e "$path" ] || return 1 |
|
|
echo "$path" |
|
|
echo "$path" |
|
@ -99,7 +98,12 @@ compose:has-container-project-myc() { |
|
|
|
|
|
|
|
|
compose:file:value-change() { |
|
|
compose:file:value-change() { |
|
|
local key="$1" value="$2" |
|
|
local key="$1" value="$2" |
|
|
yaml:file:value-change "$(compose:get-compose-yml)" "$key" "$value" || exit 1 |
|
|
|
|
|
|
|
|
local compose_yml |
|
|
|
|
|
if ! compose_yml=$(compose:get-compose-yml); then |
|
|
|
|
|
err "Couldn't locate your 'compose.yml' file." |
|
|
|
|
|
return 1 |
|
|
|
|
|
fi |
|
|
|
|
|
yaml:file:value-change "$compose_yml" "$key" "$value" || return 1 |
|
|
} |
|
|
} |
|
|
export -f compose:file:value-change |
|
|
export -f compose:file:value-change |
|
|
|
|
|
|
|
|