|
|
@ -311,10 +311,12 @@ get_docker_compose () { |
|
|
|
## |
|
|
|
|
|
|
|
declare -A entries |
|
|
|
start_compilation=$SECONDS |
|
|
|
debug "Compiling 'docker-compose.conf' base for $DARKYELLOW$@$NORMAL..." |
|
|
|
for target_service in "$@"; do |
|
|
|
start=$SECONDS |
|
|
|
services=$(get_ordered_service_dependencies "$target_service") || return 1 |
|
|
|
debug "$DARKYELLOW$target_service$NORMAL deps:$DARKYELLOW" $services "$NORMAL" |
|
|
|
debug " $DARKYELLOW$target_service$NORMAL deps:$DARKYELLOW" $services "$NORMAL $GRAY(in $((SECONDS - start)))s$NORMAL" |
|
|
|
for service in $services; do |
|
|
|
|
|
|
|
if [ "${entries[$service]}" ]; then |
|
|
@ -326,14 +328,17 @@ get_docker_compose () { |
|
|
|
|
|
|
|
## mark the service as "loaded" as well as it's containers |
|
|
|
## if this is a subordinate service |
|
|
|
start_service=$SECONDS |
|
|
|
entries[$service]=$(_get_docker_compose_service_mixin "$service") || return 1 |
|
|
|
debug " Applied $DARKYELLOW$service$NORMAL charm metadata mixins $GRAY(in $((SECONDS - start_service)))s$NORMAL" |
|
|
|
done |
|
|
|
debug " ..finished all mixins for $DARKYELLOW$target_service$NORMAL $GRAY(in $((SECONDS - start))s)$NORMAL" |
|
|
|
done |
|
|
|
|
|
|
|
merge_yaml_str "${entries[@]}" > "$cache_file" |
|
|
|
export _current_docker_compose="$(cat "$cache_file")" |
|
|
|
echo "$_current_docker_compose" |
|
|
|
debug " ... Compilation of base 'docker-compose.conf' done." || true |
|
|
|
debug " ..Compilation of base 'docker-compose.conf' done.$GRAY(in $((SECONDS - start_compilation))s)$NORMAL" || true |
|
|
|
# debug " ** ${WHITE}docker-compose.conf${NORMAL}:" |
|
|
|
# debug "$_current_docker_compose" |
|
|
|
} |
|
|
|