feat: implement proxy container :label functionality

This commit is contained in:
dragonhunt02
2025-03-22 22:01:00 +00:00
committed by Jose Diaz-Gonzalez
parent e93175b37e
commit 4eafd3b5b7
18 changed files with 273 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
source "$PLUGIN_AVAILABLE_PATH/haproxy-vhosts/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
@@ -123,6 +124,15 @@ trigger-haproxy-vhosts-docker-args-process-deploy() {
fi
fi
local proxy_labels_file_path=$(fn-proxy-get-labels-file-path "$APP" haproxy)
fn-proxy-report-label-overwrite "$output" "$proxy_labels_file_path"
if [[ -f "$proxy_labels_file_path" ]]; then
local user_proxy_labels="$(<"$proxy_labels_file_path")"
user_proxy_labels="$(echo "$user_proxy_labels" | tr '\r\n' ' ')"
output="$output $user_proxy_labels"
fi
echo -n "$STDIN$output"
}