mirror of
https://github.com/domfelipe/hermes-agent-custom.git
synced 2026-08-07 08:36:40 +00:00
fix: isolate gateway from runtime api port
This commit is contained in:
parent
2d48a02271
commit
23e98ca785
2 changed files with 17 additions and 2 deletions
|
|
@ -45,6 +45,11 @@ platform provisions all of these automatically for managed Railway services.
|
|||
`TELEGRAM_BOT_TOKEN` is present, so the container consumes Telegram polling in
|
||||
addition to serving the dashboard/proxy runtime API.
|
||||
|
||||
By default the entrypoint hides `API_SERVER_KEY` from the gateway subprocess so
|
||||
Hermes does not start its native `api_server` adapter on the same public port as
|
||||
the Mika runtime proxy. Set `HERMES_GATEWAY_API_SERVER_ENABLED=true` only if you
|
||||
intentionally want the native adapter as a separate gateway platform.
|
||||
|
||||
## Validation
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ STT_OPENAI_MODEL="${HERMES_STT_OPENAI_MODEL:-whisper-1}"
|
|||
TTS_PROVIDER="${HERMES_TTS_PROVIDER:-disabled}"
|
||||
GATEWAY_ENABLED="${HERMES_GATEWAY_ENABLED:-auto}"
|
||||
GATEWAY_ARGS="${HERMES_GATEWAY_ARGS:---replace}"
|
||||
GATEWAY_API_SERVER_ENABLED="${HERMES_GATEWAY_API_SERVER_ENABLED:-false}"
|
||||
HERMES_ALLOW_ROOT_GATEWAY="${HERMES_ALLOW_ROOT_GATEWAY:-1}"
|
||||
export HERMES_ALLOW_ROOT_GATEWAY
|
||||
|
||||
|
|
@ -153,8 +154,17 @@ esac
|
|||
|
||||
if [ "$should_start_gateway" = "true" ]; then
|
||||
echo "[entrypoint] Iniciando gateway de mensagens Hermes..."
|
||||
if [ "$GATEWAY_API_SERVER_ENABLED" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
hermes gateway run $GATEWAY_ARGS &
|
||||
else
|
||||
# The public runtime API is served by skills_api.py. Provisioned Mika
|
||||
# instances still receive API_SERVER_KEY for that proxy, so hide it from
|
||||
# the gateway process to avoid starting Hermes' native api_server adapter
|
||||
# on the same public port.
|
||||
# shellcheck disable=SC2086
|
||||
API_SERVER_ENABLED=false API_SERVER_KEY= hermes gateway run $GATEWAY_ARGS &
|
||||
fi
|
||||
GATEWAY_PID="$!"
|
||||
PIDS+=("$GATEWAY_PID")
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue