52 lines
4.3 KiB
Markdown
52 lines
4.3 KiB
Markdown
## Réseau et cartographie des services
|
||
|
||
### Sous-réseaux
|
||
- 4nk_network: 172.20.0.0/16 (services applicatifs, IP statiques et hostnames fixés)
|
||
- 4nk_projects_net: 172.21.0.0/16 (réservé, aucun service attaché pour l’instant)
|
||
|
||
### Tableau de mapping
|
||
|
||
| Service | Hostname | IP | Ports exposés | Montages conf/data/logs | Nginx (routes) | Dépendances |
|
||
|---|---|---|---|---|---|---|
|
||
| tor | tor.4nk.local | 172.20.0.10 | 9050, 9051 | conf:/etc/tor/torrc(ro), data:/var/lib/tor, logs:/var/log/tor | — | — |
|
||
| bitcoin | bitcoin.4nk.local | 172.20.0.11 | 38333, 38332, 29000 | conf:/home/bitcoin/.bitcoin/bitcoin.conf(ro), data:/home/bitcoin/.bitcoin, logs:/home/bitcoin/.bitcoin/logs | — | tor |
|
||
| blindbit | blindbit.4nk.local | 172.20.0.12 | 8000 | conf:/blindbit/blindbit.toml(ro), data:/blindbit, logs:/blindbit/logs | /blindbit/ → :8000 | bitcoin |
|
||
| sdk_storage | sdk-storage.4nk.local | 172.20.0.13 | 8081 | conf:/usr/local/bin/sdk_storage.conf(ro), logs:/app/logs | /sdk_storage/ → :8081 | blindbit |
|
||
| sdk_relay1 | sdk-relay1.4nk.local | 172.20.0.14 | 8090(ws), 8091(http) | conf:/home/bitcoin/.conf(ro), logs:/home/bitcoin/logs | /relay1/, /relay1/ws/ | sdk_storage |
|
||
| sdk_relay2 | sdk-relay2.4nk.local | 172.20.0.15 | 8092(ws), 8093(http) | conf:/home/bitcoin/.conf(ro), logs:/home/bitcoin/logs | /relay2/, /relay2/ws/ | sdk_storage |
|
||
| sdk_relay3 | sdk-relay3.4nk.local | 172.20.0.16 | 8094(ws), 8095(http) | conf:/home/bitcoin/.conf(ro), logs:/home/bitcoin/logs | /relay3/, /relay3/ws/ | sdk_storage |
|
||
| sdk_signer | sdk-signer.4nk.local | 172.20.0.17 | 9090(ws), 9092(http) | conf:/usr/local/bin/sdk_signer.conf(ro), data:/app/data, logs:/usr/src/app/logs | /signer/, /signer/ws/ | sdk_relay1/2/3 |
|
||
| ihm_client | ihm-client.4nk.local | 172.20.0.18 | 80, 3003 | logs:/var/log/ihm_client | / (→:80), /coffre/ (→coffre_front:3003) | sdk_signer |
|
||
| miniback-postgres | miniback-postgres.4nk.local | 172.20.0.30 | 5432 | data:/var/lib/postgresql/data(volume) | — | — |
|
||
| miniback | miniback.4nk.local | 172.20.0.31 | — | logs:/logs, env:.env(ro) | /miniback/ (si HTTP) | miniback-postgres |
|
||
| coffre_front | coffre-front.4nk.local | 172.20.0.32 | 3003 | logs:/logs | /coffre/ → :3003 | — |
|
||
| coffre_back_mini | coffre-back-mini.4nk.local | 172.20.0.33 | — | — | — | — |
|
||
| nginx | nginx.4nk.local | 172.20.0.40 | 80 | conf:/etc/nginx, logs:/var/log/nginx | reverse proxy + /grafana/ | — |
|
||
| ollama | ollama.4nk.local | 172.20.0.50 | 11434 | data:/root/.ollama, logs:/var/log/ollama | /ollama/ → :11434 | — |
|
||
| anythingllm | anythingllm.4nk.local | 172.20.0.51 | 3001 | conf:/app/config, data:/app/storage, logs:/app/logs | /anythingllm/ → :3001 | ollama |
|
||
|
||
### Observabilité
|
||
- Promtail lit: `./log/**/*.log`, `./modules/*/logs/**/*.log`, `./projects/*/*/logs/**/*.log` et pousse vers Loki.
|
||
- Grafana est servi via Nginx sous `/grafana/` et provisionné avec datasources/dashboards.
|
||
|
||
### Liens entre services (flux réseau et dépendances)
|
||
- Tor → Bitcoin Core
|
||
- Bitcoin utilise Tor comme proxy (`proxy=tor.4nk.local:9050`) et active `listenonion=1`.
|
||
- Bitcoin Core → Blindbit
|
||
- Blindbit lit l’endpoint RPC de Bitcoin (`http://bitcoin.4nk.local:38332`) et s’appuie sur ZMQ (`tcp://bitcoin.4nk.local:29000`).
|
||
- Blindbit → SDK Storage
|
||
- SDK Storage consomme les index/infos de Blindbit (config via `sdk_storage.conf`).
|
||
- SDK Storage → SDK Relays (1/2/3)
|
||
- Les relais interrogent Storage côté API HTTP (8091/8093/8095) et exposent WS séparés (8090/8092/8094).
|
||
- SDK Relays (1/2/3) → SDK Signer
|
||
- Signer se connecte aux trois relais (WS et/ou HTTP) et à Storage; il consomme également Blindbit et Bitcoin RPC (pour certaines opérations).
|
||
- SDK Signer → IHM Client
|
||
- L’application front s’appuie sur Signer (WS 9090, HTTP 9092) pour l’orchestration fonctionnelle.
|
||
- Miniback → Postgres
|
||
- Miniback utilise `miniback-postgres` (5432) comme base de données.
|
||
- Nginx → Tous services HTTP/WS
|
||
- Reverse‑proxy vers: IHM (`/`), Storage (`/sdk_storage/`), Blindbit (`/blindbit/`), Relais (`/relayX/` + `/relayX/ws/`), Signer (`/signer/` + `/signer/ws/`), Coffre (`/coffre/`), Miniback (`/miniback/`), Grafana (`/grafana/`).
|
||
|
||
### Notes
|
||
- Les services internes utilisent des hostnames Docker `.4nk.local` résolus par le DNS du réseau `4nk_network`.
|
||
- Les tags d’images `:dev` sont en cours de création; voir `docs/CONFIGURATION.md`. |