22 lines
750 B
Bash
Executable File
22 lines
750 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function error_handler() {
|
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
|
exit "$2"
|
|
}
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
if [[ -z "${CONNECTOR_PROXY_STATUS_IM_DOCKER_COMPOSE_PROFILE:-}" ]]; then
|
|
export CONNECTOR_PROXY_STATUS_IM_DOCKER_COMPOSE_PROFILE=run
|
|
fi
|
|
|
|
additional_args=""
|
|
if [[ "${RUN_WITH_DAEMON:-}" != "false" ]]; then
|
|
additional_args="${additional_args} -d"
|
|
fi
|
|
|
|
docker compose --profile "$CONNECTOR_PROXY_STATUS_IM_DOCKER_COMPOSE_PROFILE" build
|
|
docker compose --profile "$CONNECTOR_PROXY_STATUS_IM_DOCKER_COMPOSE_PROFILE" stop
|
|
docker compose --profile "$CONNECTOR_PROXY_STATUS_IM_DOCKER_COMPOSE_PROFILE" up --wait $additional_args
|