diff --git a/README.md b/README.md index f7e5407..d9b4f6f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/entrypoint.sh b/entrypoint.sh index c3d26af..5182bf6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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..." - # shellcheck disable=SC2086 - hermes gateway run $GATEWAY_ARGS & + 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