docs(hermes_infra): pin gateway-channels mapping + terse README
The prod hermes-gateway (stack=hermes_infra, chat-id=-1004417969359) and a separate poc gateway (stack=hermes, chat-id=-1004355191149) share the same service name in two compose files. Anyone editing hermes_infra/stack-compose.yml without seeing the poc compose risks scaling the wrong stack or merging the two into one compose — which would double-respond to inbound Telegram messages and make 'interrupted by user message' warnings meaningless. This change replaces the stale squid/blackboard README with a terse one (what / how to update / pitfall) and adds a sibling doc that records the current chat-id ↔ service mapping. Future changes must keep that table consistent. Refs admin/ansible#26.
This commit is contained in:
+11
-19
@@ -1,26 +1,18 @@
|
||||
# Domains should be limited
|
||||
# hermes_squid
|
||||
|
||||
## Not accessible
|
||||
ifconfig.me/ip
|
||||
192.168.1.0/24
|
||||
192.168.0.0/24
|
||||
http://admin:admin@100.70.193.97:8088
|
||||
Compose for the prod stack `hermes_infra` (squid, sarg, hermes-ui, hermes-gateway, docker-socket-proxy, brencher-state-proxy). One hermes-gateway, one Telegram bot, one Telegram chat-id. Do **not** mix this stack with the separate `hermes` stack that lives under `poc/hermes/` — that one targets a different bot and a different chat.
|
||||
|
||||
## Accessible
|
||||
google.com
|
||||
|
||||
# Open in browser google.com
|
||||
## It should be Comofox by default
|
||||
Sources
|
||||
|
||||
# Websearch something
|
||||
## It should be duckduckgo
|
||||
- Prod compose: `hermes_squid/stack-compose.yml`.
|
||||
- Telegram chat id mapping: see `docs/gateway-channels.md`.
|
||||
|
||||
# Allow self install packages
|
||||
|
||||
# DockerInDocker for subprofiles
|
||||
UI sessions lost
|
||||
|
||||
# Image generation
|
||||
Update
|
||||
|
||||
- Edit `hermes_squid/stack-compose.yml`, commit, push.
|
||||
- Brencher picks up `admin/ansible:master` on the next scheduler tick.
|
||||
|
||||
Pitfalls
|
||||
|
||||
- The admin mirror of this repo is `admin/ansible`; cross-fork PRs go into it.
|
||||
- The `hermes-gateway` service binds the dashboard to `0.0.0.0:8087` (compose). Healthcheck lives here too.
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Gateway ↔ chat-id mapping
|
||||
|
||||
Hard rule when editing anything in `hermes_infra/`: do not merge two Telegram stacks into a single compose. Today there are two live `hermes-gateway` services in the swarm, on **different chat-ids**:
|
||||
|
||||
| Stack | Service | chat-id | Bot token |
|
||||
|--------------------------|------------------------|----------------|---------------|
|
||||
| `hermes_infra` (prod) | `hermes-gateway` | `-1004417969359` (Home) | prod token (from docker secret) |
|
||||
| `hermes` (poc) | `hermes-gateway` | `-1004355191149` | alt token |
|
||||
| `docker_socket_proxy` | `hermes-gateway` | (none, `platforms={}`) | not connected |
|
||||
|
||||
Each gateway reads its token from a separate docker secret. Sharing a compose file between them **will** double-connect to a chat, double-respond to inbound messages, and make every "interrupted" warning meaningless.
|
||||
|
||||
How to find a service's chat-id at runtime:
|
||||
|
||||
```bash
|
||||
# from the agent host, read gateway state from inside the container:
|
||||
docker exec -it $(docker ps -qf name=hermes_infra_hermes-gateway) \
|
||||
cat /opt/data/gateway_state.json | jq '.platforms.telegram.chat_id'
|
||||
```
|
||||
|
||||
Sources
|
||||
|
||||
- `hermes_squid/stack-compose.yml` (compose for the prod stack).
|
||||
- `poc/hermes/stack-compose.yml` (compose for the other stack; lives one level up — intentionally kept separate).
|
||||
- `admin/ansible#26` (incident that motivated this file).
|
||||
|
||||
Update
|
||||
|
||||
- When a new gateway is added, add a row to the table above with the chat-id. The chat-id is what comes out of `gateway_state.json`; do not invent values.
|
||||
Reference in New Issue
Block a user