This commit is contained in:
Mateusz Gruszczyński
2026-08-24 23:11:41 +02:00
parent 4ab878d587
commit 76a6f050ae
24 changed files with 600 additions and 108 deletions
+10 -4
View File
@@ -93,10 +93,13 @@ read_env_value() {
}
health_url() {
local bind port
local bind port base
bind="$(read_env_value GREE_CONTROLLER_BIND '0.0.0.0:8787')"
port="${bind##*:}"
printf 'http://127.0.0.1:%s/api/health' "$port"
base="$(read_env_value GREE_CONTROLLER_BASE_PATH '')"
base="/${base#/}"; base="${base%/}"
[[ "$base" == "/" ]] && base=""
printf 'http://127.0.0.1:%s%s/api/health' "$port" "$base"
}
database_path() {
@@ -109,11 +112,14 @@ database_path() {
}
panel_url() {
local bind port ip
local bind port ip base
bind="$(read_env_value GREE_CONTROLLER_BIND '0.0.0.0:8787')"
port="${bind##*:}"
ip="$(hostname -I 2>/dev/null | awk '{print $1}')"
printf 'http://%s:%s' "${ip:-LXC_ADDRESS}" "$port"
base="$(read_env_value GREE_CONTROLLER_BASE_PATH '')"
base="/${base#/}"; base="${base%/}"
[[ "$base" == "/" ]] && base=""
printf 'http://%s:%s%s/' "${ip:-LXC_ADDRESS}" "$port" "$base"
}
wait_for_health() {