diff --git a/.github/workflows/compose-test_airdcpp.yml b/.github/workflows/compose-test_airdcpp.yml index 4a3515b..06bc4cb 100644 --- a/.github/workflows/compose-test_airdcpp.yml +++ b/.github/workflows/compose-test_airdcpp.yml @@ -32,7 +32,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -41,7 +41,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_gitea.yml b/.github/workflows/compose-test_gitea.yml index 54e5674..1f2e512 100644 --- a/.github/workflows/compose-test_gitea.yml +++ b/.github/workflows/compose-test_gitea.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_hass.yml b/.github/workflows/compose-test_hass.yml index e7b58c7..1713e79 100644 --- a/.github/workflows/compose-test_hass.yml +++ b/.github/workflows/compose-test_hass.yml @@ -29,7 +29,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -38,7 +38,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_indexarr.yml b/.github/workflows/compose-test_indexarr.yml index d93fbd3..4d3f866 100644 --- a/.github/workflows/compose-test_indexarr.yml +++ b/.github/workflows/compose-test_indexarr.yml @@ -32,7 +32,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -41,7 +41,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_monitarr.yml b/.github/workflows/compose-test_monitarr.yml index 60bffb9..ffc9624 100644 --- a/.github/workflows/compose-test_monitarr.yml +++ b/.github/workflows/compose-test_monitarr.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_navidrome.yml b/.github/workflows/compose-test_navidrome.yml index 985b2ee..3a205ff 100644 --- a/.github/workflows/compose-test_navidrome.yml +++ b/.github/workflows/compose-test_navidrome.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_netbox.yml b/.github/workflows/compose-test_netbox.yml index e7dad9b..6628c95 100644 --- a/.github/workflows/compose-test_netbox.yml +++ b/.github/workflows/compose-test_netbox.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_nextcloud.yml b/.github/workflows/compose-test_nextcloud.yml index e28e5fa..dc8dbce 100644 --- a/.github/workflows/compose-test_nextcloud.yml +++ b/.github/workflows/compose-test_nextcloud.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_ntfy.yml b/.github/workflows/compose-test_ntfy.yml index 3410d13..bca383a 100644 --- a/.github/workflows/compose-test_ntfy.yml +++ b/.github/workflows/compose-test_ntfy.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_pihole.yml b/.github/workflows/compose-test_pihole.yml index 1dda19f..40c502e 100644 --- a/.github/workflows/compose-test_pihole.yml +++ b/.github/workflows/compose-test_pihole.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_qbittorrent.yml b/.github/workflows/compose-test_qbittorrent.yml index 100de95..3fe2e2f 100644 --- a/.github/workflows/compose-test_qbittorrent.yml +++ b/.github/workflows/compose-test_qbittorrent.yml @@ -32,7 +32,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -41,7 +41,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_tang.yml b/.github/workflows/compose-test_tang.yml index 9226bf9..de9f062 100644 --- a/.github/workflows/compose-test_tang.yml +++ b/.github/workflows/compose-test_tang.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_teslamate.yml b/.github/workflows/compose-test_teslamate.yml index 76e465b..461c2b6 100644 --- a/.github/workflows/compose-test_teslamate.yml +++ b/.github/workflows/compose-test_teslamate.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_tiny_httpd.yml b/.github/workflows/compose-test_tiny_httpd.yml index a2aa34f..c42ffc2 100644 --- a/.github/workflows/compose-test_tiny_httpd.yml +++ b/.github/workflows/compose-test_tiny_httpd.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/compose-test_uptime.yml b/.github/workflows/compose-test_uptime.yml index 1ec0434..9ddcbb8 100644 --- a/.github/workflows/compose-test_uptime.yml +++ b/.github/workflows/compose-test_uptime.yml @@ -30,7 +30,7 @@ jobs: - name: "Service: Start" run: | - ./comp up --skip-prereqs --labels ignore ${TARGET_SERVICE} + ./comp up --skip-related --labels ignore ${TARGET_SERVICE} - name: "Service: Wait" run: | @@ -39,7 +39,7 @@ jobs: - name: "Service: Test" run: | - if ! ./comp status --skip-prereqs ${TARGET_SERVICE}; then + if ! ./comp status --skip-related ${TARGET_SERVICE}; then docker ps cd ${TARGET_SERVICE} ; docker compose logs exit 1 diff --git a/.github/workflows/config/docker-compose.vpn-proxy-expose.yml b/.github/workflows/config/docker-compose.vpn-proxy-expose.yml new file mode 100644 index 0000000..9447a1d --- /dev/null +++ b/.github/workflows/config/docker-compose.vpn-proxy-expose.yml @@ -0,0 +1,8 @@ +networks: + proxy: + external: true + +services: + vpn: + networks: + - proxy diff --git a/_scripts/test_comp.sh b/_scripts/test_comp.sh index 746efdf..d998d06 100755 --- a/_scripts/test_comp.sh +++ b/_scripts/test_comp.sh @@ -132,7 +132,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ exit_on_failure SETUP "status reports $TARGET_COMP_1_DISPLAY is unhealthy" \ - "status -P $TARGET_COMP_1" + "status -R $TARGET_COMP_1" CHECK $'grep -qs "Executing status on $TARGET_COMP_1" "$COMP_OUT_PATH"' \ "Info at beginning of execution" CHECK $'grep -qs "Unhealthy service:" "$COMP_ERR_PATH"' \ @@ -147,7 +147,7 @@ fragments: EOF SETUP "bad fragment value in meta breaks $TARGET_COMP_1_DISPLAY" \ - "overrides -P $TARGET_COMP_1" + "overrides -R $TARGET_COMP_1" CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/meta.override.yml" "$COMP_ERR_PATH"' \ "Configuration error reported for $TARGET_COMP_1_DISPLAY" \ exit_on_failure @@ -161,7 +161,7 @@ fragments: EOF SETUP "querying the overrides list for $TARGET_COMP_1_DISPLAY otherwise passes" \ - "overrides -P $TARGET_COMP_1" + "overrides -R $TARGET_COMP_1" CHECK $'grep -qs "Executing overrides on $TARGET_COMP_1" "$COMP_OUT_PATH"' \ "Info at beginning of execution" CHECK $'grep -qs "\[L\] $TARGET_COMP_1/meta.override.yml" "$COMP_OUT_PATH"' \ @@ -171,7 +171,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ exit_on_failure SETUP "$TARGET_COMP_1_DISPLAY can be started without prerequisites" \ - "up -P $TARGET_COMP_1" + "up -R $TARGET_COMP_1" CHECK $'grep -qs "Executing up on $TARGET_COMP_1" "$COMP_OUT_PATH"' \ "Info at beginning of execution" CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ @@ -192,7 +192,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_SIMPLE_VERB_FAILURE ]' \ _WAIT 30s "$TARGET_COMP_1_DISPLAY to start up and emit health status" SETUP "that status reports $TARGET_COMP_1_DISPLAY is healthy" \ - "status -P $TARGET_COMP_1" + "status -R $TARGET_COMP_1" CHECK $'grep -qs "Executing status on $TARGET_COMP_1" "$COMP_OUT_PATH"' \ "Info at beginning of execution" CHECK $'grep -qs "$TARGET_COMP_1 is healthy" "$COMP_OUT_PATH"' \ @@ -240,7 +240,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ _INIT tiny_httpd SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY may be started with different fragments" \ - "up -P $TARGET_COMP_1 $TARGET_COMP_2" + "up -R $TARGET_COMP_1 $TARGET_COMP_2" CHECK $'grep -lPqsz "Executing up on $TARGET_COMP_1.*\\n.*Disabled fragments: DEVICES \(conf\)" "$COMP_OUT_PATH"' \ "Info with disabled fragments at beginning of $TARGET_COMP_1_DISPLAY execution" \ exit_on_failure @@ -257,7 +257,7 @@ fragments: EOF SETUP "a bad fragment breaks $TARGET_COMP_1_DISPLAY but $TARGET_COMP_2_DISPLAY still works without fragments" \ - "down -P $TARGET_COMP_1 $TARGET_COMP_2" + "down -R $TARGET_COMP_1 $TARGET_COMP_2" CHECK $'grep -qs "Invalid value \'nyet\' for \'DEVICES\' in $TARGET_COMP_1/meta.override.yml" "$COMP_ERR_PATH"' \ "Configuration error reported for $TARGET_COMP_1_DISPLAY" \ exit_on_failure @@ -272,7 +272,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq $EXIT_CODE_FRAGMENTS_ERROR ]' \ exit_on_failure SETUP "$TARGET_COMP_1_DISPLAY & $TARGET_COMP_2_DISPLAY can both be stopped when ignoring overrides" \ - "down -P -O $TARGET_COMP_1 $TARGET_COMP_2" + "down -R -O $TARGET_COMP_1 $TARGET_COMP_2" CHECK $'grep -Pqs "Container $TARGET_COMP_1.* Removed" "$COMP_ERR_PATH"' \ "Stopped $TARGET_COMP_1_DISPLAY successfully" \ exit_on_failure @@ -286,7 +286,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ _INIT tang _.test.very_ .bad.name_ SETUP "starting $TARGET_COMP_3_DISPLAY works" \ - "up -P $TARGET_COMP_3" + "up -R $TARGET_COMP_3" CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \ "Name validation error due to '.'" CHECK $'grep -qs "drops leading \'_\' from project name" "$COMP_ERR_PATH"' \ @@ -298,7 +298,7 @@ CHECK $'[ $COMP_EXIT_CODE -eq 0 ]' \ _WAIT 30s "$TARGET_COMP_3_DISPLAY to start up and emit health status" SETUP "status reports $TARGET_COMP_3_DISPLAY is healthy" \ - "status -P $TARGET_COMP_3" + "status -R $TARGET_COMP_3" CHECK $'grep -qs "drops all \'\.\' from project name" "$COMP_ERR_PATH"' \ "Name validation error due to '.'" CHECK $'grep -qs "drops leading \'_\' from project name" "$COMP_ERR_PATH"' \ diff --git a/airdcpp/meta.yml b/airdcpp/meta.yml index cd55dd3..fd76b3f 100644 --- a/airdcpp/meta.yml +++ b/airdcpp/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${AIRDCPP_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/comp b/comp index 78e6b50..4b11461 100755 --- a/comp +++ b/comp @@ -29,8 +29,8 @@ EXIT_CODE_POST_HOOK_SCRIPT_ERROR=120 FLAG_FAIL_FAST="" FLAG_SKIP_OVERRIDES="" -FLAG_SKIP_PREREQS="" -FLAG_SKIP_REGENERATE="" +FLAG_SKIP_RELATED="" +FLAG_SKIP_GENERATE="" FRAGMENT_DEVICES="" FRAGMENT_HOOKS="" @@ -75,21 +75,12 @@ __create_external_networks () { done } -__do_prereqs () { - [ "$FLAG_SKIP_PREREQS" != yes ] || return 0 - - local verb="$1" - local ensure_running="${2:-no}" - while IFS= read -r prereq_comp_dir ; do - if [ "$verb" = status ] ; then - if ! __CALL_SELF__ status -F "$prereq_comp_dir" ; then - [ "$ensure_running" = yes ] || return 1 - __CALL_SELF__ up -F "$prereq_comp_dir" || return 1 - fi - else - __CALL_SELF__ "$verb" -F "$prereq_comp_dir" || return 1 - fi - done < <( "$YQ_CMD" "${_CUR_YQ_META_QUERY_PFX_} .pre_reqs | .[]" meta.yml 2>/dev/null ) +__do_ () { + local target="$1" + local verb="$2" + while IFS= read -r target_comp_dir ; do + __CALL_SELF__ "$verb" --fail-fast "$target_comp_dir" || return 1 + done < <( "$YQ_CMD" "${_CUR_YQ_META_QUERY_PFX_} .$target | .[]" meta.yml 2>/dev/null ) } __error () { @@ -97,7 +88,7 @@ __error () { } __gen_env () { - [ ! -f .env ] || [ "$FLAG_SKIP_REGENERATE" != yes ] || return 0 + [ ! -f .env ] || [ "$FLAG_SKIP_GENERATE" != yes ] || return 0 rm -rf .env printf "[*] Generating '.env':" @@ -133,7 +124,7 @@ __gen_templates () { local generated_file="./generated${template_file#./extra}" mkdir -p "$(dirname "$generated_file")" generated_file="${generated_file/.template/}" - if [ ! -f "$generated_file" ] || [ "$FLAG_SKIP_REGENERATE" != yes ] ; then + if [ ! -f "$generated_file" ] || [ "$FLAG_SKIP_GENERATE" != yes ] ; then "$SCRIPTS_DIR/generate-and-verify.sh" "$template_file" "$generated_file" \ || return 1 fi @@ -263,11 +254,11 @@ __will_invoke_compose () { } __will_do_pre_reqs () { - [ "$FLAG_SKIP_PREREQS" != yes ] && { - [ "$_CUR_VERB_" = overrides ] || [ "$_CUR_VERB_" = pull ] \ - || [ "$_CUR_VERB_" = status ] || [ "$_CUR_VERB_" = up ] \ - || [ "$_CUR_VERB_" = validate ] ; - } + [ "$_CUR_VERB_" != clean ] && [ "$_CUR_VERB_" != down ] +} + +__will_do_related () { + [ "$FLAG_SKIP_RELATED" != yes ] && __will_do_pre_reqs } # # # # # # # # # # # # # # # # # # # TOP-LEVEL VERBS # # # # # # # # # # # # # # # # # # # @@ -386,10 +377,10 @@ Verbs: (short forms within <>) alidate Validate a composition Flags: - [-P | --skip-prereqs] Ignore verifying/starting prerequisite compositions [-F | --fail-fast] Fail on the first verb failure + [-G | --skip-generate] Use existing '.env' and 'generated/' [-O | --skip-overrides] Ignore overrides in scripts, environments, flags etc. - [-R | --skip-regenerate] Use existing '.env' and 'generated/' + [-R | --skip-related] Ignore verifying/starting sibling compositions Fragments: { use | ignore } [-d | --devices] Attach devices listed in 'docker-compose.devices.yml' @@ -444,9 +435,9 @@ for opt in "$@" ; do shift case "$opt" in --fail-fast) set -- "$@" "-F" ;; - --skip-prereqs) set -- "$@" "-P" ;; + --skip-generate) set -- "$@" "-G" ;; --skip-overrides) set -- "$@" "-O" ;; - --skip-regenerate) set -- "$@" "-R" ;; + --skip-related) set -- "$@" "-R" ;; --devices) set -- "$@" "-d" ;; --hooks) set -- "$@" "-h" ;; @@ -476,12 +467,12 @@ validate_and_set_fragment () { } OPTIND=1 -while getopts ':FOPRd:g:h:l:p:' OPTION ; do +while getopts ':FGORd:g:h:l:p:' OPTION ; do case "$OPTION" in F ) FLAG_FAIL_FAST=yes ;; + G ) FLAG_SKIP_GENERATE=yes ;; O ) FLAG_SKIP_OVERRIDES=yes ;; - P ) FLAG_SKIP_PREREQS=yes ;; - R ) FLAG_SKIP_REGENERATE=yes ;; + R ) FLAG_SKIP_RELATED=yes ;; d ) validate_and_set_fragment "$OPTARG" DEVICES usage ;; g ) validate_and_set_fragment "$OPTARG" LOGGING usage ;; @@ -562,16 +553,7 @@ for _CUR_COMP_ in "${COMPOSITIONS[@]}" ; do (( ++_CUR_STAGE_ )) if __will_do_pre_reqs ; then [ "$_CUR_STAGE_" -gt 1 ] || [ "$COMP_SELF_CALL_DEPTH" -gt 0 ] || echo - [ "$_CUR_VERB_" != overrides ] || __do_prereqs overrides \ - || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue - [ "$_CUR_VERB_" != pull ] || __do_prereqs pull \ - || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue - [ "$_CUR_VERB_" != status ] || __do_prereqs status \ - || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue - [ "$_CUR_VERB_" != up ] || __do_prereqs status yes \ - || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue - [ "$_CUR_VERB_" != validate ] || __do_prereqs validate \ - || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue + __do_ pre_reqs "$_CUR_VERB_" || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue fi [ "$_CUR_VERB_" = validate ] || do_validate non_failing @@ -610,6 +592,11 @@ for _CUR_COMP_ in "${COMPOSITIONS[@]}" ; do [ $verb_ret -eq 0 ] || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue + if __will_do_related ; then + [ "$_CUR_STAGE_" -gt 1 ] || [ "$COMP_SELF_CALL_DEPTH" -gt 0 ] || echo + __do_ related "$_CUR_VERB_" || __maybe_fail_fast $EXIT_CODE_SIMPLE_VERB_FAILURE || continue + fi + if __will_invoke_compose ; then [ "$FRAGMENT_HOOKS" != use ] || __run_hooks post \ || __maybe_fail_fast $EXIT_CODE_POST_HOOK_SCRIPT_ERROR || continue diff --git a/docker_sock/docker-compose.labels.yml b/docker_sock/docker-compose.labels.yml index f3ce3fd..30a21d2 100644 --- a/docker_sock/docker-compose.labels.yml +++ b/docker_sock/docker-compose.labels.yml @@ -5,5 +5,5 @@ services: traefik.docker.network: shared traefik.http.services.docker_sock.loadBalancer.server.port: 9000 # - traefik.http.routers.docker_sock.rule: Host(`${SERVER_LAN_FQDN:?}`) && PathPrefix(`/docker_sock`) + traefik.http.routers.docker_sock.rule: Host(`${SERVER_LAN_FQDN:?}`) && PathPrefix(`/${DOCKER_SOCK_PROXY_BASE_PATH:?}`) traefik.http.routers.docker_sock.entryPoints: lan-internal diff --git a/docker_sock/meta.yml b/docker_sock/meta.yml new file mode 100644 index 0000000..346d489 --- /dev/null +++ b/docker_sock/meta.yml @@ -0,0 +1,9 @@ +messages: + up: + post: + - >- + ${_THIS_COMPOSITION_} stats may now be accessed on + ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:34443/${DOCKER_SOCK_PROXY_BASE_PATH}/${_RESET_FONT_} + +related: +- traefik diff --git a/docker_sock/static.env b/docker_sock/static.env index 0b295d0..0f19469 100644 --- a/docker_sock/static.env +++ b/docker_sock/static.env @@ -1 +1,2 @@ DOCKER_SOCK_PROXY_VERSION=2.8.10 +DOCKER_SOCK_PROXY_BASE_PATH=docker_sock diff --git a/gitea/meta.yml b/gitea/meta.yml index d77b663..7e3726a 100644 --- a/gitea/meta.yml +++ b/gitea/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_B}/${GITEA_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/hass/meta.yml b/hass/meta.yml index 692bff9..f17d6d8 100644 --- a/hass/meta.yml +++ b/hass/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/indexarr/meta.yml b/indexarr/meta.yml index 38b8e8b..4b3d855 100644 --- a/indexarr/meta.yml +++ b/indexarr/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_}:jackett may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${JACKETT_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/monitarr/meta.yml b/monitarr/meta.yml index 2acda4a..90dd6ad 100644 --- a/monitarr/meta.yml +++ b/monitarr/meta.yml @@ -11,5 +11,5 @@ messages: ${_THIS_COMPOSITION_}:sonarr may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${SONARR_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/navidrome/meta.yml b/navidrome/meta.yml index 505c155..3af304e 100644 --- a/navidrome/meta.yml +++ b/navidrome/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${NAVIDROME_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/netbox/meta.yml b/netbox/meta.yml index 48778a0..6d14286 100644 --- a/netbox/meta.yml +++ b/netbox/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_B}/${NETBOX_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/nextcloud/meta.yml b/nextcloud/meta.yml index 53bd59f..9de5a5b 100644 --- a/nextcloud/meta.yml +++ b/nextcloud/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${NEXTCLOUD_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/ntfy/meta.yml b/ntfy/meta.yml index 5af763e..d6a34ae 100644 --- a/ntfy/meta.yml +++ b/ntfy/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} UI may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_A}/${NTFY_BASE_PATH}${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/pihole/meta.yml b/pihole/meta.yml index 046a367..39df3e0 100644 --- a/pihole/meta.yml +++ b/pihole/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_B}/${PIHOLE_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/qbittorrent/meta.yml b/qbittorrent/meta.yml index 51967df..48f1bb8 100644 --- a/qbittorrent/meta.yml +++ b/qbittorrent/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${QBITTORRENT_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/tang/meta.yml b/tang/meta.yml index 77306d7..385984a 100644 --- a/tang/meta.yml +++ b/tang/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} is now listening on ${_LINK_FONT_}http://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTP_PORT_B}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/teslamate/meta.yml b/teslamate/meta.yml index 3339f78..c0b9553 100644 --- a/teslamate/meta.yml +++ b/teslamate/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_B}/${TESLAMATE_BASE_PATH}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/tiny_httpd/meta.yml b/tiny_httpd/meta.yml index 692bff9..f17d6d8 100644 --- a/tiny_httpd/meta.yml +++ b/tiny_httpd/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_WAN_FQDN}:${SERVER_WAN_HTTPS_PORT}/${_RESET_FONT_} -pre_reqs: +related: - traefik diff --git a/uptime/meta.yml b/uptime/meta.yml index a1d91c1..1a5a327 100644 --- a/uptime/meta.yml +++ b/uptime/meta.yml @@ -5,5 +5,5 @@ messages: ${_THIS_COMPOSITION_} may now be accessed on ${_LINK_FONT_}https://${SERVER_LAN_FQDN}:${SERVER_LAN_HTTPS_PORT_A}${_RESET_FONT_} -pre_reqs: +related: - traefik