|
|
@ -779,14 +779,18 @@ run_service_hook () { |
|
|
|
|
|
|
|
PROJECT_NAME=$(get_default_project_name) || return 1 |
|
|
|
Wrap -d "$YELLOW$action$NORMAL hook of charm $DARKYELLOW$charm$NORMAL" <<EOF || return 1 |
|
|
|
|
|
|
|
cd "$CHARM_STORE/$charm" |
|
|
|
SERVICE_NAME=$subservice \ |
|
|
|
CHARM_NAME="$charm" \ |
|
|
|
PROJECT_NAME=$PROJECT_NAME \ |
|
|
|
DOCKER_BASE_IMAGE=$(service_base_docker_image "$charm") \ |
|
|
|
SERVICE_DATASTORE="$DATASTORE/$charm" \ |
|
|
|
SERVICE_CONFIGSTORE="$CONFIGSTORE/$charm" \ |
|
|
|
"$TARGET_SCRIPT" |
|
|
|
|
|
|
|
export SERVICE_NAME=$subservice |
|
|
|
export CHARM_NAME="$charm" |
|
|
|
export PROJECT_NAME=$PROJECT_NAME |
|
|
|
export DOCKER_BASE_IMAGE=$(service_base_docker_image "$charm") |
|
|
|
export SERVICE_DATASTORE="$DATASTORE/$charm" |
|
|
|
export SERVICE_CONFIGSTORE="$CONFIGSTORE/$charm" |
|
|
|
|
|
|
|
"$TARGET_SCRIPT" |
|
|
|
|
|
|
|
EOF |
|
|
|
loaded[$subservice]=1 |
|
|
|
done |
|
|
@ -1558,8 +1562,8 @@ launch_docker_compose() { |
|
|
|
{ |
|
|
|
{ |
|
|
|
cd "$docker_compose_dir" |
|
|
|
debug "${WHITE}docker-compose.yml$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL" |
|
|
|
debug "$(cat "$docker_compose_dir/docker-compose.yml")" |
|
|
|
debug "${WHITE}docker-compose.yml$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL:" |
|
|
|
debug "$(cat "$docker_compose_dir/docker-compose.yml" | prefix " $GRAY|$NORMAL ")" |
|
|
|
debug "${WHITE}Launching$NORMAL: docker-compose $@" |
|
|
|
docker-compose "$@" |
|
|
|
echo "$?" > "$docker_compose_dir/.data/errlvl" |
|
|
|