fix: configure workbench service secret fallback

This commit is contained in:
richjohnrambo
2026-09-16 15:21:28 +08:00
parent 3e40554229
commit 82379b8823
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -322,7 +322,7 @@ imInternalApi:
imWorkbenchApi: imWorkbenchApi:
baseUrl: "http://im_workbench:6061" baseUrl: "http://im_workbench:6061"
serviceName: "hotgo-admin" serviceName: "hotgo-admin"
serviceSecret: "${IM_WORKBENCH_API_SECRET}" serviceSecret: "${IM_INTERNAL_API_SECRET}"
timeout: "5s" timeout: "5s"
imConfigApi: imConfigApi:
+8
View File
@@ -3,6 +3,14 @@ set -e
cd /app cd /app
if [ -z "${IM_WORKBENCH_API_SECRET:-}" ]; then
if [ -n "${IM_INTERNAL_API_SECRET:-}" ]; then
export IM_WORKBENCH_API_SECRET="$IM_INTERNAL_API_SECRET"
elif [ -n "${IM_ADMIN_API_SECRET:-}" ]; then
export IM_WORKBENCH_API_SECRET="$IM_ADMIN_API_SECRET"
fi
fi
# Render the real config from the template using only the specific env vars we # Render the real config from the template using only the specific env vars we
# expect — avoids accidentally substituting anything else that might contain a # expect — avoids accidentally substituting anything else that might contain a
# literal '$' in the YAML. # literal '$' in the YAML.