fix: configure workbench service secret fallback
This commit is contained in:
@@ -322,7 +322,7 @@ imInternalApi:
|
||||
imWorkbenchApi:
|
||||
baseUrl: "http://im_workbench:6061"
|
||||
serviceName: "hotgo-admin"
|
||||
serviceSecret: "${IM_WORKBENCH_API_SECRET}"
|
||||
serviceSecret: "${IM_INTERNAL_API_SECRET}"
|
||||
timeout: "5s"
|
||||
|
||||
imConfigApi:
|
||||
|
||||
@@ -3,6 +3,14 @@ set -e
|
||||
|
||||
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
|
||||
# expect — avoids accidentally substituting anything else that might contain a
|
||||
# literal '$' in the YAML.
|
||||
|
||||
Reference in New Issue
Block a user