Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
a6b73f57e6 | |||
4db2942fd0 | |||
e15ba65fa5 | |||
acbfbfaaff | |||
e1c71f7b41 | |||
c2f9000837 | |||
0d3a293625 | |||
4b4d613073 | |||
82c91f5487 | |||
5399504204 | |||
![]() |
2f663d20a2 | ||
![]() |
1159aabc3f | ||
![]() |
d122ab0493 | ||
![]() |
c1da1fe716 | ||
![]() |
36dc747e18 | ||
![]() |
3991cedc85 | ||
![]() |
b3f31d6b5b | ||
![]() |
aad486cf54 | ||
![]() |
0b91120ff5 | ||
![]() |
3ad6b25fc4 | ||
![]() |
c7f9748718 | ||
![]() |
2839c167a6 | ||
![]() |
67808fc9b8 |
@ -15,6 +15,15 @@ coverage/
|
|||||||
.parcel-cache/
|
.parcel-cache/
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
|
*/data/
|
||||||
|
*/data/*
|
||||||
|
*/log/
|
||||||
|
*/archive/
|
||||||
|
*/certs/
|
||||||
|
*/sql_dumps/
|
||||||
|
*/db_dumps/
|
||||||
|
*/database_dumps/
|
||||||
|
*/backups/sql/
|
||||||
# Logs et temporaires
|
# Logs et temporaires
|
||||||
*.log
|
*.log
|
||||||
*.tmp
|
*.tmp
|
||||||
|
25
.gitignore
vendored
25
.gitignore
vendored
@ -11,6 +11,31 @@ coverage/
|
|||||||
.tmp/
|
.tmp/
|
||||||
.parcel-cache/
|
.parcel-cache/
|
||||||
|
|
||||||
|
*/data/
|
||||||
|
*/data/*
|
||||||
|
*/log/
|
||||||
|
*/archive/
|
||||||
|
*/certs/
|
||||||
|
*/sql_dumps/
|
||||||
|
*/db_dumps/
|
||||||
|
*/database_dumps/
|
||||||
|
*/backups/sql/
|
||||||
|
|
||||||
|
*.conf
|
||||||
|
*.toml
|
||||||
|
*.log
|
||||||
|
*.lock
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
*/data/
|
||||||
|
*/log/
|
||||||
|
*/archive/
|
||||||
|
*/certs/
|
||||||
|
*/sql_dumps/
|
||||||
|
*/db_dumps/
|
||||||
|
*/database_dumps/
|
||||||
|
*/backups/sql/
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -1,8 +0,0 @@
|
|||||||
[submodule "sdk_storage"]
|
|
||||||
path = sdk_storage
|
|
||||||
url = https://git.4nkweb.com/4nk/sdk_storage.git
|
|
||||||
branch = docker-support
|
|
||||||
[submodule "sdk_signer"]
|
|
||||||
path = sdk_signer
|
|
||||||
url = https://git.4nkweb.com/4nk/sdk_signer.git
|
|
||||||
branch = docker-support
|
|
30
CHANGELOG.md
30
CHANGELOG.md
@ -1,11 +1,39 @@
|
|||||||
## Changed (2025-09-08)
|
## Changed (2025-09-10)
|
||||||
# Changelog - 4NK Node
|
# Changelog - 4NK Node
|
||||||
|
|
||||||
|
## [1.1.4-wip.1] - 2025-09-10
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- docker-compose.yml: qualification des images 4NK vers `git.4nkweb.com` (ihm_client, sdk_storage, sdk_signer, blindbit-oracle, lecoffre-*).
|
||||||
|
- docker-compose.yml: remplacement de Tor par `dperson/torproxy:latest`.
|
||||||
|
- docker-compose.yml: unification des relais `sdk_relay1/2/3` sur l’image unique `git.4nkweb.com/4nk/sdk_relay:dev`.
|
||||||
|
- docker-compose.yml: correction des chemins `modules/blindbit-oracle/*` et des noms `*oracle`.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
- DEPLOYMENT.md: mise à jour des images, ports, services, procédures (copie des `*.exemple`).
|
||||||
|
- CONFIGURATION.md: mise à jour de la politique de tags et procédures usuelles.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Démarrage bloqué par montage `tor.conf` (répertoire créé par erreur): régularisation en fichier + copie depuis `.exemple`.
|
||||||
|
|
||||||
|
---
|
||||||
## [1.1.3] - 2025-09-07
|
## [1.1.3] - 2025-09-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Mise à jour mineure de versionnage et documentation (ALIGNEMENT VERSION / TESTS)
|
- Mise à jour mineure de versionnage et documentation (ALIGNEMENT VERSION / TESTS)
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
- ARCHITECTURE.md : ajout des sections Contexte, Composants, Réseaux, Flux, Données, Sécurité, Observabilité, Décisions.
|
||||||
|
- CONFIGURATION.md : consolidation des tags `:dev`, réseaux, montages, variables, healthchecks, routage et procédures usuelles sans modifier les fichiers de configuration.
|
||||||
|
- USAGE.md : mise à jour pour la configuration hybride (Docker + services locaux Nginx/Grafana).
|
||||||
|
- INSTALLATION.md : guide d'installation complet avec prérequis, étapes détaillées, configuration et dépannage.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
- docker-compose.yml : suppression des services `nginx`, `grafana`, `ollama`, `anythingllm`, `loki`, `promtail`, `devtools`, `miniback` (services externalisés, locaux ou doublons).
|
||||||
|
- Installation locale : Nginx et Grafana installés et configurés localement selon la documentation.
|
||||||
|
- Services IA : Externalisés vers le repository [4NK_IA](https://git.4nkweb.com/4nk/4NK_IA.git) sur le tag `dev`.
|
||||||
|
- Configuration hybride : Nginx local proxy vers les ports Docker exposés (127.0.0.1), Grafana local configuré pour le monitoring.
|
||||||
|
|
||||||
## [1.1.2] - 2025-08-27
|
## [1.1.2] - 2025-08-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
20
conf/dnsmasq/dnsmasq.conf.exemple
Normal file
20
conf/dnsmasq/dnsmasq.conf.exemple
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# dnsmasq config for 4NK - listens on 127.0.0.1:5353
|
||||||
|
no-dhcp-interface=
|
||||||
|
port=5353
|
||||||
|
interface=lo
|
||||||
|
bind-interfaces
|
||||||
|
log-queries
|
||||||
|
|
||||||
|
# 4NK Docker hosts
|
||||||
|
address=/tor.local/172.20.0.10
|
||||||
|
address=/bitcoin.local/172.20.0.11
|
||||||
|
address=/blindbit-oracle.local/172.20.0.12
|
||||||
|
address=/sdk-storage.local/172.20.0.13
|
||||||
|
address=/sdk-relay1.local/172.20.0.14
|
||||||
|
address=/sdk-relay2.local/172.20.0.15
|
||||||
|
address=/sdk-relay3.local/172.20.0.16
|
||||||
|
address=/sdk-signer.local/172.20.0.17
|
||||||
|
address=/ihm-client.local/172.20.0.18
|
||||||
|
address=/miniback-postgres.local/172.20.0.30
|
||||||
|
address=/coffre-front.local/172.20.0.32
|
||||||
|
address=/coffre-back-mini.local/172.20.0.33
|
0
data/.gitkeep
Normal file
0
data/.gitkeep
Normal file
@ -4,16 +4,12 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
tor:
|
tor:
|
||||||
image: torproject/tor:latest
|
image: dperson/torproxy:latest
|
||||||
container_name: 4nk-tor
|
container_name: 4nk-tor
|
||||||
hostname: tor.4nk.local
|
hostname: tor.local
|
||||||
ports:
|
ports:
|
||||||
- "9050:9050"
|
- "9050:9050"
|
||||||
- "9051:9051"
|
- "9051:9051"
|
||||||
volumes:
|
|
||||||
- ./modules/tor/conf/tor.conf:/etc/tor/torrc:ro
|
|
||||||
- ./modules/tor/data:/var/lib/tor
|
|
||||||
- ./modules/tor/log:/var/log/tor
|
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.10
|
ipv4_address: 172.20.0.10
|
||||||
@ -21,15 +17,15 @@ services:
|
|||||||
|
|
||||||
bitcoin:
|
bitcoin:
|
||||||
image: ruimarinho/bitcoin-core:latest
|
image: ruimarinho/bitcoin-core:latest
|
||||||
container_name: 4nk-bitcoin
|
container_name: bitcoin.local
|
||||||
hostname: bitcoin.4nk.local
|
hostname: bitcoin.local
|
||||||
ports:
|
ports:
|
||||||
- "38333:38333"
|
- "38333:38333"
|
||||||
- "38332:38332"
|
- "38332:38332"
|
||||||
- "29000:29000"
|
- "29000:29000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/bitcoin/data:/home/bitcoin/.bitcoin
|
- ./modules/bitcoin/data:/home/bitcoin/.bitcoin
|
||||||
- ./modules/bitcoin/conf/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf:ro
|
- ./modules/bitcoin/conf/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf
|
||||||
- ./modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs
|
- ./modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
@ -38,10 +34,10 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- tor
|
- tor
|
||||||
|
|
||||||
blindbit:
|
blindbit-oracle:
|
||||||
image: 4nk-node-blindbit:latest
|
image: git.4nkweb.com/4nk/blindbit-oracle:dev
|
||||||
container_name: 4nk-blindbit
|
container_name: blindbit-oracle.local
|
||||||
hostname: blindbit.4nk.local
|
hostname: blindbit-oracle.local
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|
||||||
@ -55,12 +51,12 @@ services:
|
|||||||
- TWEAKS_FULL_BASIC=1
|
- TWEAKS_FULL_BASIC=1
|
||||||
- TWEAKS_FULL_WITH_DUST_FILTER=1
|
- TWEAKS_FULL_WITH_DUST_FILTER=1
|
||||||
- TWEAKS_CUT_THROUGH_WITH_DUST_FILTER=1
|
- TWEAKS_CUT_THROUGH_WITH_DUST_FILTER=1
|
||||||
command: ["/main", "--datadir", "/blindbit"]
|
command: [ "/main", "--datadir", "/blindbit-oracle" ]
|
||||||
working_dir: /
|
working_dir: /
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/blindbit/conf/blindbit.toml:/blindbit/blindbit.toml:ro
|
- ./modules/blindbit-oracle/conf/blindbit.toml:/blindbit-oracle/blindbit.toml:ro
|
||||||
- ./modules/blindbit/data:/blindbit
|
- ./modules/blindbit-oracle/data:/blindbit-oracle
|
||||||
- ./modules/blindbit/logs:/blindbit/logs
|
- ./modules/blindbit-oracle/logs:/blindbit-oracle/logs
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.12
|
ipv4_address: 172.20.0.12
|
||||||
@ -68,18 +64,18 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- bitcoin
|
- bitcoin
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8000"]
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8000" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_storage:
|
sdk_storage:
|
||||||
image: 4nk-node-sdk_storage:dev
|
image: git.4nkweb.com/4nk/sdk_storage:dev
|
||||||
container_name: 4nk-sdk-storage
|
container_name: 4nk-sdk-storage
|
||||||
hostname: sdk-storage.4nk.local
|
hostname: sdk-storage.local
|
||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/sdk_storage/conf/sdk_storage.conf:/usr/local/bin/sdk_storage.conf:ro
|
- ./modules/sdk_storage/conf/sdk_storage.conf:/usr/local/bin/sdk_storage.conf:ro
|
||||||
- ./modules/sdk_storage/log:/app/logs
|
- ./modules/sdk_storage/log:/app/logs
|
||||||
@ -87,19 +83,17 @@ services:
|
|||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.13
|
ipv4_address: 172.20.0.13
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
|
||||||
- blindbit
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8081"]
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8080" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay1:
|
sdk_relay1:
|
||||||
image: 4nk-node-sdk_relay1:dev
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
||||||
container_name: 4nk-sdk-relay1
|
container_name: 4nk-sdk-relay1
|
||||||
hostname: sdk-relay1.4nk.local
|
hostname: sdk-relay1.local
|
||||||
ports:
|
ports:
|
||||||
- "8090:8090"
|
- "8090:8090"
|
||||||
- "8091:8091"
|
- "8091:8091"
|
||||||
@ -115,18 +109,18 @@ services:
|
|||||||
ipv4_address: 172.20.0.14
|
ipv4_address: 172.20.0.14
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- sdk_storage
|
- blindbit-oracle
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay2:
|
sdk_relay2:
|
||||||
image: 4nk-node-sdk_relay2:dev
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
||||||
container_name: 4nk-sdk-relay2
|
container_name: 4nk-sdk-relay2
|
||||||
hostname: sdk-relay2.4nk.local
|
hostname: sdk-relay2.local
|
||||||
ports:
|
ports:
|
||||||
- "8092:8090"
|
- "8092:8090"
|
||||||
- "8093:8091"
|
- "8093:8091"
|
||||||
@ -142,18 +136,18 @@ services:
|
|||||||
ipv4_address: 172.20.0.15
|
ipv4_address: 172.20.0.15
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- sdk_storage
|
- blindbit-oracle
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay3:
|
sdk_relay3:
|
||||||
image: 4nk-node-sdk_relay3:dev
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
||||||
container_name: 4nk-sdk-relay3
|
container_name: 4nk-sdk-relay3
|
||||||
hostname: sdk-relay3.4nk.local
|
hostname: sdk-relay3.local
|
||||||
ports:
|
ports:
|
||||||
- "8094:8090"
|
- "8094:8090"
|
||||||
- "8095:8091"
|
- "8095:8091"
|
||||||
@ -169,18 +163,18 @@ services:
|
|||||||
ipv4_address: 172.20.0.16
|
ipv4_address: 172.20.0.16
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- sdk_storage
|
- blindbit-oracle
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_signer:
|
sdk_signer:
|
||||||
image: 4nk-node-sdk_signer:dev
|
image: git.4nkweb.com/4nk/sdk_signer:dev
|
||||||
container_name: 4nk-sdk-signer
|
container_name: 4nk-sdk-signer
|
||||||
hostname: sdk-signer.4nk.local
|
hostname: sdk-signer.local
|
||||||
ports:
|
ports:
|
||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
volumes:
|
volumes:
|
||||||
@ -192,20 +186,21 @@ services:
|
|||||||
ipv4_address: 172.20.0.17
|
ipv4_address: 172.20.0.17
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- sdk_storage
|
||||||
- sdk_relay1
|
- sdk_relay1
|
||||||
- sdk_relay2
|
- sdk_relay2
|
||||||
- sdk_relay3
|
- sdk_relay3
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:9090"]
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:9090" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
ihm_client:
|
ihm_client:
|
||||||
image: 4nk-node-ihm_client:dev
|
image: git.4nkweb.com/4nk/ihm_client:dev
|
||||||
container_name: 4nk-ihm-client
|
container_name: 4nk-ihm-client
|
||||||
hostname: ihm-client.4nk.local
|
hostname: ihm-client.local
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
- "3003:3003"
|
- "3003:3003"
|
||||||
@ -216,18 +211,21 @@ services:
|
|||||||
ipv4_address: 172.20.0.18
|
ipv4_address: 172.20.0.18
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- sdk_signer
|
- sdk_storage
|
||||||
|
- sdk_relay1
|
||||||
|
- sdk_relay2
|
||||||
|
- sdk_relay3
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost"]
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
miniback-postgres:
|
miniback-postgres:
|
||||||
image: postgres:15
|
image: postgres:16
|
||||||
container_name: miniback-postgres
|
container_name: miniback-postgres
|
||||||
hostname: miniback-postgres.4nk.local
|
hostname: miniback-postgres.local
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=miniback
|
- POSTGRES_USER=miniback
|
||||||
- POSTGRES_PASSWORD=minibackpassword
|
- POSTGRES_PASSWORD=minibackpassword
|
||||||
@ -241,60 +239,36 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
miniback:
|
|
||||||
image: 4nk-node-miniback:dev
|
|
||||||
container_name: miniback
|
|
||||||
hostname: miniback.4nk.local
|
|
||||||
env_file:
|
|
||||||
- ./projects/lecoffre/lecoffre-back-mini/conf/lecoffre-back-mini_env.conf
|
|
||||||
depends_on:
|
|
||||||
- miniback-postgres
|
|
||||||
networks:
|
|
||||||
4nk_network:
|
|
||||||
ipv4_address: 172.20.0.31
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- ./projects/lecoffre/lecoffre-back-mini/logs:/logs
|
|
||||||
- ./projects/lecoffre/lecoffre-back-mini/conf/lecoffre-back-mini_env.conf:/app/.env:ro
|
|
||||||
|
|
||||||
coffre_front:
|
coffre_front:
|
||||||
image: lecoffre-front:dev
|
image: git.4nkweb.com/4nk/lecoffre-front:dev
|
||||||
container_name: coffre-front
|
container_name: coffre-front
|
||||||
hostname: coffre-front.4nk.local
|
hostname: coffre-front.local
|
||||||
volumes:
|
volumes:
|
||||||
- ./projects/lecoffre/lecoffre-front/logs:/logs
|
- ./projects/lecoffre/lecoffre-front/logs:/logs
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.32
|
ipv4_address: 172.20.0.32
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- coffre_back_mini
|
||||||
|
- ihm_client
|
||||||
|
- sdk_signer
|
||||||
|
|
||||||
coffre_back_mini:
|
coffre_back_mini:
|
||||||
image: lecoffre-back-mini:dev
|
image: git.4nkweb.com/4nk/lecoffre-back-mini:dev
|
||||||
container_name: coffre-back-mini
|
container_name: coffre-back-mini
|
||||||
hostname: coffre-back-mini.4nk.local
|
hostname: coffre-back-mini.local
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.33
|
ipv4_address: 172.20.0.33
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
nginx:
|
- miniback-postgres
|
||||||
image: nginx:1.25
|
|
||||||
container_name: 4nk-nginx
|
|
||||||
hostname: nginx.4nk.local
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
volumes:
|
|
||||||
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
||||||
- ./conf/nginx/sites-enabled:/etc/nginx/sites-enabled:ro
|
|
||||||
- ./log/nginx:/var/log/nginx
|
|
||||||
networks:
|
|
||||||
4nk_network:
|
|
||||||
ipv4_address: 172.20.0.40
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
miniback_pg_data:
|
miniback_pg_data:
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
@ -1,20 +1,68 @@
|
|||||||
## ARCHITECTURE
|
## Architecture
|
||||||
|
|
||||||
## Contexte
|
### Contexte
|
||||||
|
|
||||||
## Composants
|
Cette page décrit l’architecture fonctionnelle et technique de `4NK_node`, un orchestrateur local des services 4NK s’appuyant principalement sur Docker, avec la possibilité d’exécuter certains outils (Nginx, Grafana) localement selon `docs/USAGE.md`. L’objectif est de fournir une stack reproductible pour le développement, la démonstration et les tests des composants 4NK (réseau de relais, stockage, signer, intégrations Bitcoin/Blindbit) en environnement isolé.
|
||||||
|
|
||||||
## Flux et dépendances
|
### Composants
|
||||||
|
|
||||||
## Données et modèles
|
- Tor : proxy d’anonymisation utilisé par Bitcoin Core.
|
||||||
|
- Bitcoin Core (signet) : nœud de référence pour RPC et notifications ZMQ.
|
||||||
|
- Blindbit : service d’indexation et filtres pour Silent Payments.
|
||||||
|
- SDK Storage : service d’API interne consommé par les relais.
|
||||||
|
- SDK Relay (1/2/3) : frontaux temps réel (HTTP/WS) consommant Storage.
|
||||||
|
- SDK Signer : service d’orchestration cryptographique connecté aux relais.
|
||||||
|
- IHM client : interface utilisateur consommant le Signer.
|
||||||
|
- Services IA : Externalisés vers le repository [4NK_IA](https://git.4nkweb.com/4nk/4NK_IA.git) (tag `dev`).
|
||||||
|
- Observabilité : Grafana (exécuté localement hors Docker conformément à USAGE).
|
||||||
|
- Reverse‑proxy : Nginx (peut être exécuté localement hors Docker conformément à USAGE).
|
||||||
|
|
||||||
## Sécurité
|
### Réseaux et adresses
|
||||||
|
|
||||||
## Observabilité
|
- Réseau principal : `4nk_network` en 172.20.0.0/16, IP statiques et hostnames Docker en `.4nk.local`.
|
||||||
|
- Réseau projets : `4nk_projects_net` en 172.21.0.0/16 (réservé, non attaché par défaut).
|
||||||
|
|
||||||
|
### Flux et dépendances
|
||||||
|
|
||||||
|
1. Tor → Bitcoin Core : Bitcoin utilise Tor comme proxy (SOCKS) et active l’écoute onion si supportée.
|
||||||
|
2. Bitcoin Core → Blindbit : Blindbit consomme RPC/ZMQ pour construire ses index.
|
||||||
|
3. Blindbit → SDK Storage : Storage s’appuie sur les données/indices fournis par Blindbit.
|
||||||
|
4. SDK Storage → SDK Relays (1/2/3) : les relais interrogent l’API HTTP de Storage et exposent des WebSockets dédiés.
|
||||||
|
5. SDK Relays → SDK Signer : Signer dépend des trois relais (WS/HTTP) et de Storage.
|
||||||
|
6. SDK Signer → IHM : l’IHM consomme Signer (WS/HTTP) via le reverse‑proxy.
|
||||||
|
7. Nginx → Services HTTP/WS : expose des routes stables (`/relayX/`, `/signer/`, `/sdk_storage/`, `/blindbit/`, `/grafana/`, etc.).
|
||||||
|
|
||||||
|
### Données et modèles
|
||||||
|
|
||||||
|
- Données Bitcoin : blockchain signet, cookie RPC, logs.
|
||||||
|
- Données Blindbit/Storage : index, caches, journaux applicatifs.
|
||||||
|
- Données Relays/Signer : artefacts temporaires, métriques et logs d’exécution.
|
||||||
|
- Données IHM et projets : fichiers d’application, artefacts runtime, logs.
|
||||||
|
- Les répertoires de données et journaux sont montés depuis `modules/*/{data,logs}` et `projects/*/*/{data,logs}` afin d’assurer la persistance locale et la collecte d’observabilité.
|
||||||
|
|
||||||
|
### Sécurité
|
||||||
|
|
||||||
|
- Cloisonnement par réseau Docker dédié (`4nk_network`) avec IP et hostnames statiques.
|
||||||
|
- Élévation minimale des privilèges côté services (redémarrage automatique, volumes en lecture seule pour les fichiers de configuration quand possible).
|
||||||
|
- Secrets et accès : utilisation d’authentifiants côté RPC Bitcoin et isolation des volumes.
|
||||||
|
- Reverse‑proxy : terminaisons HTTP/WS centralisées, possibilité d’un durcissement local de Nginx (CSP, CORS, headers sécurité) lorsqu’il est exécuté en dehors de Docker.
|
||||||
|
- Alerte : aucune CI active pour l’instant (cf. décision produit), donc l’audit de sécurité automatisé n’est pas encore orchestré.
|
||||||
|
|
||||||
|
### Observabilité
|
||||||
|
|
||||||
|
- Grafana installé localement pour la visualisation des métriques et logs.
|
||||||
|
- Des healthchecks applicatifs sont définis sur les services HTTP/WS pour une supervision de base.
|
||||||
|
- Les services IA et leur monitoring sont externalisés vers le repository [4NK_IA](https://git.4nkweb.com/4nk/4NK_IA.git).
|
||||||
|
|
||||||
### Politique des images
|
### Politique des images
|
||||||
|
|
||||||
- Externes : Tor (`torproject/tor:latest`), Bitcoin Core (`ruimarinho/bitcoin-core:latest`), Blindbit (`4nk-node-blindbit:latest`).
|
- Externes : Tor (`torproject/tor:latest`), Bitcoin Core (`ruimarinho/bitcoin-core:latest`), Blindbit (`4nk-node-blindbit:latest`).
|
||||||
- Internes : images taguées `:dev` en cours de création (sdk_storage, sdk_relay1/2/3, sdk_signer, ihm_client, miniback, lecoffre-front, lecoffre-back-mini).
|
- Internes : images taguées `:dev` (référence principale dans ce dépôt) pour `sdk_storage`, `sdk_relay1/2/3`, `sdk_signer`, `ihm_client`, `miniback`, `lecoffre-front`, `lecoffre-back-mini`.
|
||||||
|
|
||||||
Les hostnames internes sont fixés en `.4nk.local` et une IP statique est réservée par service sur `4nk_network`.
|
Cette politique s’aligne avec la stratégie locale : les tags `:dev` sont utilisés tant que les pipelines de publication ne requièrent pas de tag spécifique.
|
||||||
|
|
||||||
|
### Décisions et implications
|
||||||
|
|
||||||
|
- Exécution locale possible de Nginx et Grafana conformément à `USAGE.md` : ne pas modifier les fichiers de configuration, mais documenter les points d’intégration et de provisioning.
|
||||||
|
- Réservation d’IP statiques et de hostnames `.4nk.local` : simplifie le routage et la documentation réseau.
|
||||||
|
- Pas de workflow CI pour l’instant : les validations (tests/documentation) sont manuelles et locales.
|
||||||
|
145
docs/BITCOIN_TROUBLESHOOTING.md
Normal file
145
docs/BITCOIN_TROUBLESHOOTING.md
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
# Diagnostic et résolution des problèmes Bitcoin Core
|
||||||
|
|
||||||
|
## Problèmes identifiés et solutions appliquées
|
||||||
|
|
||||||
|
### 1. Répertoire wallets manquant
|
||||||
|
|
||||||
|
**Problème** : Bitcoin Core ne peut pas démarrer car le répertoire `/home/bitcoin/.bitcoin/wallets` n'existe pas.
|
||||||
|
|
||||||
|
**Erreur** :
|
||||||
|
```
|
||||||
|
Error: Specified -walletdir "/home/bitcoin/.bitcoin/wallets" does not exist
|
||||||
|
```
|
||||||
|
|
||||||
|
**Solution appliquée** :
|
||||||
|
```bash
|
||||||
|
sudo mkdir -p modules/bitcoin/data/wallets
|
||||||
|
sudo chown -R 101:101 modules/bitcoin/data/wallets
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Mode debug problématique
|
||||||
|
|
||||||
|
**Problème** : Le mode debug (`debug=1`, `loglevel=debug`) génère trop de logs et peut causer des instabilités.
|
||||||
|
|
||||||
|
**Solution appliquée** :
|
||||||
|
```ini
|
||||||
|
#debug=1
|
||||||
|
#loglevel=debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Configuration RPC signet
|
||||||
|
|
||||||
|
**Configuration finale** :
|
||||||
|
```ini
|
||||||
|
[signet]
|
||||||
|
listen=1
|
||||||
|
bind=bitcoin.local:38333
|
||||||
|
rpcbind=bitcoin.local:18443
|
||||||
|
rpcport=18443
|
||||||
|
fallbackfee=0.0001
|
||||||
|
blockfilterindex=1
|
||||||
|
datacarriersize=205
|
||||||
|
acceptnonstdtxn=1
|
||||||
|
dustrelayfee=0.00000001
|
||||||
|
minrelaytxfee=0.00000001
|
||||||
|
prune=0
|
||||||
|
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
||||||
|
walletdir=/home/bitcoin/.bitcoin/wallets
|
||||||
|
wallet=mining
|
||||||
|
wallet=watchonly
|
||||||
|
maxtxfee=1
|
||||||
|
addnode=tlv2yqamflv22vfdzy2hha2nwmt6zrwrhjjzz4lx7qyq7lyc6wfhabyd.onion
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Dépendances Docker Compose
|
||||||
|
|
||||||
|
**Problème** : Service `blindbit-oracle` dépendait de `bitcoin.local` au lieu de `bitcoin`.
|
||||||
|
|
||||||
|
**Solution appliquée** :
|
||||||
|
```yaml
|
||||||
|
depends_on:
|
||||||
|
- bitcoin # au lieu de bitcoin.local
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Configuration réseau Docker
|
||||||
|
|
||||||
|
**Réseau autorisé pour RPC** :
|
||||||
|
```ini
|
||||||
|
rpcallowip=172.20.0.0/16
|
||||||
|
```
|
||||||
|
|
||||||
|
**Réseau Docker 4NK** :
|
||||||
|
```yaml
|
||||||
|
networks:
|
||||||
|
4nk_network:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.20.0.0/16
|
||||||
|
```
|
||||||
|
|
||||||
|
## État actuel des services
|
||||||
|
|
||||||
|
### Services stables
|
||||||
|
- ✅ **4nk-tor** : Up (health: starting)
|
||||||
|
- ✅ **4nk-sdk-storage** : Up (health: starting)
|
||||||
|
- ✅ **4nk-sdk-signer** : Up (health: starting)
|
||||||
|
- ✅ **4nk-ihm-client** : Up (health: starting)
|
||||||
|
- ✅ **coffre-front** : Up
|
||||||
|
- ✅ **miniback-postgres** : Up
|
||||||
|
|
||||||
|
### Services en redémarrage
|
||||||
|
- ⚠️ **bitcoin.local** : Restarting (1)
|
||||||
|
- ⚠️ **blindbit-oracle.local** : Restarting (1)
|
||||||
|
- ⚠️ **4nk-sdk-relay1** : Restarting (1)
|
||||||
|
- ⚠️ **4nk-sdk-relay2** : Restarting (1)
|
||||||
|
- ⚠️ **4nk-sdk-relay3** : Restarting (1)
|
||||||
|
- ⚠️ **coffre-back-mini** : Restarting (1)
|
||||||
|
|
||||||
|
## Problèmes persistants
|
||||||
|
|
||||||
|
### Bitcoin Core redémarre en boucle
|
||||||
|
|
||||||
|
**Symptômes** :
|
||||||
|
- Bitcoin Core se ferme proprement (`Shutdown: done`)
|
||||||
|
- Le conteneur redémarre immédiatement
|
||||||
|
- Cycle de redémarrage continu
|
||||||
|
|
||||||
|
**Causes possibles** :
|
||||||
|
1. **Configuration Tor** : `onion=tor:9050` pourrait causer des problèmes de connectivité
|
||||||
|
2. **Configuration signet** : Paramètres signet incompatibles
|
||||||
|
3. **Problème de réseau** : Conflit avec la configuration réseau Docker
|
||||||
|
4. **Configuration wallets** : Wallets `mining` et `watchonly` problématiques
|
||||||
|
|
||||||
|
### Services dépendants instables
|
||||||
|
|
||||||
|
Les services qui dépendent de Bitcoin Core (blindbit-oracle, sdk-relay*) redémarrent également car ils ne peuvent pas se connecter à l'API RPC Bitcoin.
|
||||||
|
|
||||||
|
## Recommandations
|
||||||
|
|
||||||
|
1. **Investigation approfondie** : Analyser les logs Bitcoin Core pour identifier la cause racine des redémarrages
|
||||||
|
2. **Configuration simplifiée** : Tester avec une configuration Bitcoin minimale
|
||||||
|
3. **Tests de connectivité** : Vérifier la connectivité réseau entre les conteneurs
|
||||||
|
4. **Documentation** : Maintenir ce document à jour avec les nouvelles découvertes
|
||||||
|
|
||||||
|
## Commandes utiles
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Vérifier les logs Bitcoin
|
||||||
|
docker-compose logs bitcoin
|
||||||
|
|
||||||
|
# Vérifier le statut des services
|
||||||
|
docker-compose ps
|
||||||
|
|
||||||
|
# Redémarrer Bitcoin uniquement
|
||||||
|
docker-compose restart bitcoin
|
||||||
|
|
||||||
|
# Vérifier les permissions
|
||||||
|
ls -la modules/bitcoin/data/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Date de création** : 2025-09-10
|
||||||
|
**Dernière mise à jour** : 2025-09-10
|
||||||
|
**Statut** : En cours de diagnostic
|
@ -1,34 +1,53 @@
|
|||||||
## Configuration des images et tags
|
## Configuration des images, réseaux et paramètres
|
||||||
|
|
||||||
### Introduction
|
### Politique de tags et registres
|
||||||
|
|
||||||
Ce document précise l'état courant de la politique de tags d'images et leur utilisation dans l'orchestrateur de `4NK_node`.
|
- Référence: les services 4NK tirent les images `:dev` depuis `git.4nkweb.com`.
|
||||||
|
- Images externes stables: `dperson/torproxy:latest`, `ruimarinho/bitcoin-core:latest`.
|
||||||
### Politique de tags (en cours de création)
|
- Blindbit: `git.4nkweb.com/4nk/blindbit-oracle:dev`.
|
||||||
|
- Relais: `git.4nkweb.com/4nk/sdk_relay:dev` (image unique pour 1/2/3).
|
||||||
- Les tags de build « dev » sont en cours de création pour les services applicatifs internes.
|
- Signer/Storage/UI/Coffre: images `git.4nkweb.com/4nk/*:dev`.
|
||||||
- À date, l'orchestrateur référence :
|
|
||||||
- Images externes stables (inchangées) : `torproject/tor:latest`, `ruimarinho/bitcoin-core:latest` et `4nk-node-blindbit:latest`.
|
|
||||||
- Images internes basculées sur le tag « dev » (en attente de disponibilité sur le registre) :
|
|
||||||
- `4nk-node-sdk_storage:dev`
|
|
||||||
- `4nk-node-sdk_relay1:dev`, `4nk-node-sdk_relay2:dev`, `4nk-node-sdk_relay3:dev`
|
|
||||||
- `4nk-node-sdk_signer:dev`
|
|
||||||
- `4nk-node-ihm_client:dev`
|
|
||||||
- `4nk-node-miniback:dev`
|
|
||||||
- `lecoffre-front:dev`, `lecoffre-back-mini:dev`
|
|
||||||
|
|
||||||
Lorsque les tags « dev » seront effectivement publiés, un `docker compose pull` puis un redémarrage permettront d'aligner les environnements.
|
|
||||||
|
|
||||||
### Réseaux et adresses
|
### Réseaux et adresses
|
||||||
|
|
||||||
- Réseau principal `4nk_network` : `172.20.0.0/16`, IP et hostnames statiques par service.
|
- `4nk_network` : `172.20.0.0/16` avec IP statiques et hostnames `.4nk.local` par service.
|
||||||
- Réseau réservé projets `4nk_projects_net` : `172.21.0.0/16` (aucun service attaché pour l'instant).
|
- `4nk_projects_net` : `172.21.0.0/16` réservé pour des projets additionnels.
|
||||||
|
|
||||||
### Montages de configuration et journaux
|
### Montages (configuration, données, logs)
|
||||||
|
|
||||||
- Les fichiers de configuration sont montés depuis `modules/*/conf` et `projects/*/*/conf`.
|
- Configuration : montée en lecture seule lorsque possible depuis `modules/*/conf` et `projects/*/*/conf`.
|
||||||
- Les journaux applicatifs sont montés depuis `modules/*/logs` et `projects/*/*/logs` pour observabilité.
|
- Données : volumes persistants locaux (`modules/*/data`, `projects/*/*/data`).
|
||||||
|
- Journaux : `modules/*/logs`, `projects/*/*/logs`, et `./log` pour la stack d’observabilité.
|
||||||
|
|
||||||
|
### Variables d’environnement (exemples typés)
|
||||||
|
|
||||||
|
- Journalisation :
|
||||||
|
- `RUST_LOG` : chaîne (ex. `debug,bitcoincore_rpc=trace`).
|
||||||
|
- Bitcoin :
|
||||||
|
- `BITCOIN_COOKIE_PATH` : chemin absolu vers le cookie RPC.
|
||||||
|
- Synchronisation (selon besoins locaux) :
|
||||||
|
- `ENABLE_SYNC_TEST` : booléen (0/1) activant certains scénarios de test.
|
||||||
|
|
||||||
|
Nota : ces variables sont documentées pour référence et ne modifient pas la configuration existante.
|
||||||
|
|
||||||
|
### Healthchecks et supervision
|
||||||
|
|
||||||
|
- Services HTTP/WS instrumentés par des healthchecks (requêtes HTTP simples sur ports exposés).
|
||||||
|
- Stack observabilité : Promtail collecte les logs montés et les pousse vers Loki ; Grafana consomme Loki.
|
||||||
|
- Conformément à `USAGE.md`, Grafana peut être exécuté localement (hors Docker) ou via le service de l’orchestrateur.
|
||||||
|
|
||||||
|
### Nginx et routage
|
||||||
|
|
||||||
|
- Nginx agit en reverse‑proxy et expose des routes stables : `/`, `/blindbit/`, `/sdk_storage/`, `/relay1|2|3/` (+ `/ws/`), `/signer/` (+ `/ws/`), `/coffre/`, `/grafana/`.
|
||||||
|
- L’exécution locale (hors Docker) est supportée ; les fichiers de configuration existants ne sont pas modifiés par ce document.
|
||||||
|
|
||||||
|
### Procédures usuelles
|
||||||
|
|
||||||
|
- Initialiser les configurations: copier tous les fichiers `*.exemple` vers leur homonyme sans suffixe.
|
||||||
|
- Vérifier les images : `docker-compose pull`.
|
||||||
|
- Démarrer la stack : `docker-compose up -d`.
|
||||||
|
- Consulter les logs : `docker-compose logs --tail=100`.
|
||||||
|
|
||||||
### Conclusion
|
### Conclusion
|
||||||
|
|
||||||
Les tags « dev » sont en cours de création et déjà référencés dans l'orchestrateur afin d'anticiper leur disponibilité. Cette page sera actualisée dès publication effective. Les mises à jour corrélées sont reflétées dans `docs/ARCHITECTURE.md` et le `CHANGELOG.md`.
|
Cette page consolide les paramètres clefs (tags `:dev`, topologie réseau, montages, variables, healthchecks, routage) afin d’harmoniser l’usage sans modifier les fichiers de configuration. Les évolutions futures seront répercutées dans `docs/ARCHITECTURE.md` et consignées dans `CHANGELOG.md`.
|
||||||
|
@ -3,16 +3,29 @@
|
|||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
### Images et tags
|
### Images et tags
|
||||||
- tor: 4nk-node-tor:latest
|
- tor: dperson/torproxy:latest
|
||||||
- bitcoin: 4nk-node-bitcoin:latest
|
- bitcoin: ruimarinho/bitcoin-core:latest
|
||||||
|
- blindbit: git.4nkweb.com/4nk/blindbit-oracle:dev
|
||||||
|
- sdk_storage: git.4nkweb.com/4nk/sdk_storage:dev
|
||||||
|
- sdk_signer: git.4nkweb.com/4nk/sdk_signer:dev
|
||||||
|
- sdk_relay1/2/3: git.4nkweb.com/4nk/sdk_relay:dev (image unique)
|
||||||
|
- ihm_client: git.4nkweb.com/4nk/ihm_client:dev
|
||||||
|
- coffre_back_mini: git.4nkweb.com/4nk/lecoffre-back-mini:dev
|
||||||
|
- coffre_front: git.4nkweb.com/4nk/lecoffre-front:dev
|
||||||
|
|
||||||
### docker-compose
|
### docker-compose
|
||||||
- Fichier: 4NK_node/docker-compose.yml
|
- Fichier: 4NK_node/docker-compose.yml
|
||||||
- Services:
|
- Services:
|
||||||
- tor: ports 9050, 9051; volume tor_data; conf conf/tor.conf
|
- tor: ports 9050, 9051; conf optionnelle `modules/tor/conf/tor.conf` (copiée depuis `.exemple`)
|
||||||
- bitcoin: ports 38333, 18443, 29000; volume bitcoin_data; conf conf/bitcoin.conf; dépend de tor
|
- bitcoin: ports 38333, 38332, 29000; volumes `modules/bitcoin/{data,logs}`; conf `modules/bitcoin/conf/bitcoin.conf`; dépend de tor
|
||||||
|
- blindbit: port 8000; conf `modules/blindbit-oracle/conf/blindbit.toml`; dépend de bitcoin
|
||||||
|
- sdk_storage: port 8081
|
||||||
|
- sdk_relay1/2/3: ports 8090/8091
|
||||||
|
- sdk_signer: port 9090
|
||||||
|
- ihm_client: ports 8080/3003
|
||||||
|
- miniback-postgres: port 5432
|
||||||
- Réseau: 4nk_network (bridge)
|
- Réseau: 4nk_network (bridge)
|
||||||
- Volumes nommés: tor_data, bitcoin_data
|
- Volumes nommés: miniback_pg_data
|
||||||
|
|
||||||
## Intégration dans 4NK_node
|
## Intégration dans 4NK_node
|
||||||
- Configuration centralisée dans 4NK_node/conf/ (ex: bitcoin.conf, tor.conf).
|
- Configuration centralisée dans 4NK_node/conf/ (ex: bitcoin.conf, tor.conf).
|
||||||
@ -20,21 +33,30 @@
|
|||||||
- Modules complémentaires (ihm_client, sdk_relay, sdk_storage, sdk_signer) s’intègrent via 4NK_node/modules/ et le réseau Docker partagé.
|
- Modules complémentaires (ihm_client, sdk_relay, sdk_storage, sdk_signer) s’intègrent via 4NK_node/modules/ et le réseau Docker partagé.
|
||||||
|
|
||||||
## CI/CD appliquée
|
## CI/CD appliquée
|
||||||
- Construire les images avec le tag dédié docker-support-v2 selon la politique du projet.
|
- Les services 4NK tirent les images `:dev` depuis `git.4nkweb.com`.
|
||||||
- Valider les builds et la santé (healthchecks) avant déploiement.
|
- Valider les healthchecks (wget sur ports exposés) avant déploiement.
|
||||||
- Publier les artefacts et images dans le registre interne si applicable.
|
- Publier les images sur `git.4nkweb.com` pour toute mise à jour.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Variables d’environnement
|
### Variables d’environnement
|
||||||
- Gérées au niveau des services consommateurs (ex: ihm_client, sdk_*).
|
- Gérées au niveau des services consommateurs (ex: ihm_client, sdk_*).
|
||||||
|
|
||||||
### Fichiers de configuration (4NK_node/conf)
|
### Fichiers de configuration (4NK_node/conf et modules/*/conf)
|
||||||
- bitcoin.conf (Bitcoin Core)
|
- `modules/bitcoin/conf/bitcoin.conf`
|
||||||
- tor.conf (Tor)
|
- `modules/tor/conf/tor.conf` (copier depuis `tor.conf.exemple` si absent)
|
||||||
- Fichiers spécifiques modules: sdk_relay*.conf, sdk_signer.conf, sdk_storage.conf, ihm_client.conf, nginx.conf
|
- `modules/blindbit-oracle/conf/blindbit.toml`
|
||||||
|
- `modules/sdk_relay{1,2,3}/conf/sdk_relay*.conf`
|
||||||
|
- `modules/sdk_signer/conf/.env`
|
||||||
|
- `modules/sdk_storage/conf/sdk_storage.conf`
|
||||||
|
- `modules/ihm_client/conf/.env`
|
||||||
|
- `conf/nginx/nginx.conf`, `conf/nginx/sites-enabled/4nk_node.conf`
|
||||||
|
|
||||||
### Réseau et ports
|
### Réseau et ports
|
||||||
- tor: 9050 (SOCKS), 9051 (Control)
|
- tor: 9050 (SOCKS), 9051 (Control)
|
||||||
- bitcoin: 38333 (P2P testnet/regtest), 18443 (RPC), 29000 (custom)
|
- bitcoin: 38333 (P2P signet), 38332 (RPC), 29000 (custom)
|
||||||
|
- blindbit: 8000
|
||||||
|
- sdk_storage: 8081
|
||||||
|
- sdk_relay: 8090/8091
|
||||||
|
- sdk_signer: 9090
|
||||||
|
- ihm_client: 8080/3003
|
||||||
|
120
docs/DNSMASQ_SETUP.md
Normal file
120
docs/DNSMASQ_SETUP.md
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# Configuration dnsmasq pour 4NK
|
||||||
|
|
||||||
|
## Vue d'ensemble
|
||||||
|
|
||||||
|
dnsmasq est configuré pour résoudre les noms Docker 4NK sur le port 5353, permettant à Nginx local d'accéder aux services Docker via leurs hostnames.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
Nginx local (port 80)
|
||||||
|
↓
|
||||||
|
dnsmasq (port 5353)
|
||||||
|
↓
|
||||||
|
Services Docker (172.20.0.0/16)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Fichier de configuration
|
||||||
|
- **Emplacement** : `conf/dnsmasq/dnsmasq.conf`
|
||||||
|
- **Port** : 5353 (évite le conflit avec le DNS système sur le port 53)
|
||||||
|
- **Interface** : 127.0.0.1
|
||||||
|
|
||||||
|
### Résolution des noms Docker
|
||||||
|
|
||||||
|
| Service | Hostname | IP Docker |
|
||||||
|
|---------|----------|-----------|
|
||||||
|
| tor | `tor.4nk.local` | 172.20.0.10 |
|
||||||
|
| bitcoin | `bitcoin.4nk.local` | 172.20.0.11 |
|
||||||
|
| blindbit | `blindbit-core.4nk.local` | 172.20.0.12 |
|
||||||
|
| sdk_storage | `sdk-storage.4nk.local` | 172.20.0.13 |
|
||||||
|
| sdk_relay1 | `sdk-relay1.4nk.local` | 172.20.0.14 |
|
||||||
|
| sdk_relay2 | `sdk-relay2.4nk.local` | 172.20.0.15 |
|
||||||
|
| sdk_relay3 | `sdk-relay3.4nk.local` | 172.20.0.16 |
|
||||||
|
| sdk_signer | `sdk-signer.4nk.local` | 172.20.0.17 |
|
||||||
|
| ihm_client | `ihm-client.4nk.local` | 172.20.0.18 |
|
||||||
|
| coffre_front | `coffre-front.4nk.local` | 172.20.0.32 |
|
||||||
|
| coffre_back_mini | `coffre-back-mini.4nk.local` | 172.20.0.33 |
|
||||||
|
| miniback-postgres | `miniback-postgres.4nk.local` | 172.20.0.30 |
|
||||||
|
|
||||||
|
## Utilisation
|
||||||
|
|
||||||
|
### Démarrage
|
||||||
|
```bash
|
||||||
|
# Démarrer dnsmasq pour 4NK
|
||||||
|
./scripts/start-dnsmasq.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test de résolution
|
||||||
|
```bash
|
||||||
|
# Test avec nslookup
|
||||||
|
nslookup -port=5353 tor.4nk.local 127.0.0.1
|
||||||
|
nslookup -port=5353 coffre-front.4nk.local 127.0.0.1
|
||||||
|
|
||||||
|
# Test avec dig
|
||||||
|
dig @127.0.0.1 -p 5353 bitcoin.4nk.local
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuration système (optionnel)
|
||||||
|
Pour utiliser dnsmasq comme DNS principal :
|
||||||
|
```bash
|
||||||
|
# Ajouter dans /etc/resolv.conf
|
||||||
|
echo "nameserver 127.0.0.1" >> /etc/resolv.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Intégration avec Nginx
|
||||||
|
|
||||||
|
Nginx peut maintenant utiliser les hostnames Docker :
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
# Configuration Nginx
|
||||||
|
location /coffre/ {
|
||||||
|
proxy_pass http://coffre-front.4nk.local:80/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Dépannage
|
||||||
|
|
||||||
|
### Vérifier le statut
|
||||||
|
```bash
|
||||||
|
# Vérifier si dnsmasq écoute sur le port 5353
|
||||||
|
netstat -tlnp | grep 5353
|
||||||
|
|
||||||
|
# Vérifier les processus dnsmasq
|
||||||
|
ps aux | grep dnsmasq
|
||||||
|
```
|
||||||
|
|
||||||
|
### Logs
|
||||||
|
```bash
|
||||||
|
# Logs dnsmasq (si configuré)
|
||||||
|
tail -f /var/log/dnsmasq.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arrêt
|
||||||
|
```bash
|
||||||
|
# Arrêter dnsmasq
|
||||||
|
pkill -f "dnsmasq.*5353"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Avantages
|
||||||
|
|
||||||
|
1. **Noms Docker natifs** : Utilise les hostnames Docker configurés
|
||||||
|
2. **Pas de conflit** : Port 5353 évite les conflits avec le DNS système
|
||||||
|
3. **Configuration centralisée** : Un seul fichier de configuration
|
||||||
|
4. **Facilité de maintenance** : Script de démarrage automatisé
|
||||||
|
5. **Compatibilité** : Fonctionne avec Nginx local et Docker
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
1. **Port non-standard** : Nécessite une configuration spécifique
|
||||||
|
2. **Dépendance** : Nginx doit être configuré pour utiliser dnsmasq
|
||||||
|
3. **Maintenance** : Les IPs Docker doivent être mises à jour si le réseau change
|
||||||
|
|
||||||
|
## Sécurité
|
||||||
|
|
||||||
|
- dnsmasq écoute uniquement sur 127.0.0.1
|
||||||
|
- Pas d'exposition externe
|
||||||
|
- Configuration limitée au réseau 4NK
|
@ -5,12 +5,16 @@
|
|||||||
- Architecture: `docs/ARCHITECTURE.md`
|
- Architecture: `docs/ARCHITECTURE.md`
|
||||||
- Usage: `docs/USAGE.md`
|
- Usage: `docs/USAGE.md`
|
||||||
- Réseau et cartographie: `docs/NETWORK.md`
|
- Réseau et cartographie: `docs/NETWORK.md`
|
||||||
|
- Déploiement: `docs/DEPLOYMENT.md`
|
||||||
|
|
||||||
### Monitoring et logs
|
### Monitoring et logs
|
||||||
- Stack monitoring (Loki/Promtail/Grafana): `log-monitoring.yml`
|
- Stack monitoring (Loki/Promtail/Grafana): `log-monitoring.yml`
|
||||||
- Provisioning Grafana: `log/grafana-datasources.yml`, `log/grafana-dashboards.yml`
|
- Provisioning Grafana: `log/grafana-datasources.yml`, `log/grafana-dashboards.yml`
|
||||||
- Collecte Promtail: `log/promtail-config.yml`
|
- Collecte Promtail: `log/promtail-config.yml`
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
- Connectivité HTTP basique: `tests/connectivity/check_http_endpoints.sh`
|
||||||
|
|
||||||
### Reverse proxy
|
### Reverse proxy
|
||||||
- Nginx conf: `conf/nginx/nginx.conf`
|
- Nginx conf: `conf/nginx/nginx.conf`
|
||||||
- Virtual host: `conf/nginx/sites-enabled/4nk_node.conf`
|
- Virtual host: `conf/nginx/sites-enabled/4nk_node.conf`
|
||||||
|
309
docs/INSTALLATION.md
Normal file
309
docs/INSTALLATION.md
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
# Installation 4NK Node
|
||||||
|
|
||||||
|
## Prérequis système
|
||||||
|
|
||||||
|
### Système d'exploitation
|
||||||
|
- **Linux** : Debian/Ubuntu (recommandé) ou distribution compatible
|
||||||
|
- **WSL2** : Windows Subsystem for Linux 2 (pour Windows)
|
||||||
|
- **VM Linux** : VirtualBox, VMware, Hyper-V
|
||||||
|
|
||||||
|
### Ressources minimales
|
||||||
|
- **CPU** : 2 cœurs minimum, 4 cœurs recommandés
|
||||||
|
- **RAM** : 4 Go minimum, 8 Go recommandés
|
||||||
|
- **Stockage** : 20 Go minimum pour la blockchain signet
|
||||||
|
- **Réseau** : Connexion Internet stable
|
||||||
|
|
||||||
|
## Installation des dépendances
|
||||||
|
|
||||||
|
### 1. Mise à jour du système
|
||||||
|
```bash
|
||||||
|
sudo apt update && sudo apt upgrade -y
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Installation de Docker
|
||||||
|
```bash
|
||||||
|
# Installation de Docker
|
||||||
|
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||||
|
sudo sh get-docker.sh
|
||||||
|
|
||||||
|
# Ajouter l'utilisateur au groupe docker
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
|
||||||
|
# Redémarrer la session ou exécuter
|
||||||
|
newgrp docker
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Installation de Docker Compose
|
||||||
|
```bash
|
||||||
|
# Docker Compose est inclus avec Docker moderne
|
||||||
|
docker compose version
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Installation de Git
|
||||||
|
```bash
|
||||||
|
sudo apt install -y git
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Installation de Nginx (local)
|
||||||
|
```bash
|
||||||
|
sudo apt install -y nginx
|
||||||
|
sudo systemctl enable nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Installation de Grafana (local)
|
||||||
|
```bash
|
||||||
|
# Ajouter la clé GPG Grafana
|
||||||
|
wget -q -O - https://packages.grafana.com/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/grafana-archive-keyring.gpg > /dev/null
|
||||||
|
|
||||||
|
# Ajouter le dépôt Grafana
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/grafana-archive-keyring.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
|
||||||
|
|
||||||
|
# Installer Grafana
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y grafana
|
||||||
|
|
||||||
|
# Activer Grafana
|
||||||
|
sudo systemctl enable grafana-server
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation du projet
|
||||||
|
|
||||||
|
### 1. Cloner le repository
|
||||||
|
```bash
|
||||||
|
# Cloner avec SSH (recommandé)
|
||||||
|
git clone git@git.4nkweb.com:4nk/4NK_node.git
|
||||||
|
cd 4NK_node
|
||||||
|
|
||||||
|
# Ou cloner avec HTTPS
|
||||||
|
git clone https://git.4nkweb.com/4nk/4NK_node.git
|
||||||
|
cd 4NK_node
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Basculer sur la branche dev
|
||||||
|
```bash
|
||||||
|
git checkout dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Vérifier la structure
|
||||||
|
```bash
|
||||||
|
# Vérifier la présence des répertoires
|
||||||
|
ls -la modules/ projects/ conf/ log/
|
||||||
|
|
||||||
|
# Vérifier docker-compose.yml
|
||||||
|
cat docker-compose.yml | head -20
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### 1. Configuration Nginx
|
||||||
|
```bash
|
||||||
|
# Copier les configurations
|
||||||
|
sudo cp conf/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
sudo cp conf/nginx/sites-enabled/4nk_node.conf /etc/nginx/sites-enabled/4nk_node.conf
|
||||||
|
|
||||||
|
# Supprimer la configuration par défaut
|
||||||
|
sudo rm -f /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
|
# Tester la configuration
|
||||||
|
sudo nginx -t
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Configuration Grafana
|
||||||
|
```bash
|
||||||
|
# Copier les configurations de monitoring
|
||||||
|
sudo cp log/grafana-datasources.yml /etc/grafana/provisioning/datasources/
|
||||||
|
sudo cp log/grafana-dashboards.yml /etc/grafana/provisioning/dashboards/
|
||||||
|
sudo cp -r log/dashboards /etc/grafana/provisioning/
|
||||||
|
|
||||||
|
# Créer les répertoires de logs
|
||||||
|
mkdir -p log/nginx modules/*/logs projects/*/*/logs
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Configuration des permissions
|
||||||
|
```bash
|
||||||
|
# Permissions pour les logs
|
||||||
|
sudo chown -R $USER:$USER log/ modules/*/logs projects/*/*/logs
|
||||||
|
|
||||||
|
# Permissions pour Docker
|
||||||
|
sudo chmod 666 /var/run/docker.sock
|
||||||
|
```
|
||||||
|
|
||||||
|
## Démarrage des services
|
||||||
|
|
||||||
|
### 1. Services locaux
|
||||||
|
```bash
|
||||||
|
# Démarrer Nginx
|
||||||
|
sudo systemctl start nginx
|
||||||
|
sudo systemctl status nginx
|
||||||
|
|
||||||
|
# Démarrer Grafana
|
||||||
|
sudo systemctl start grafana-server
|
||||||
|
sudo systemctl status grafana-server
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Services Docker
|
||||||
|
```bash
|
||||||
|
# Tester la configuration
|
||||||
|
docker compose config --services
|
||||||
|
|
||||||
|
# Démarrer les services externes d'abord
|
||||||
|
docker compose up -d tor bitcoin blindbit miniback-postgres
|
||||||
|
|
||||||
|
# Vérifier le statut
|
||||||
|
docker ps
|
||||||
|
|
||||||
|
# Démarrer les services 4NK (si images disponibles)
|
||||||
|
docker compose up -d sdk_storage sdk_relay1 sdk_relay2 sdk_relay3 sdk_signer ihm_client
|
||||||
|
|
||||||
|
# Voir les logs
|
||||||
|
docker compose logs [service_name]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Vérification des services
|
||||||
|
```bash
|
||||||
|
# Vérifier les ports ouverts
|
||||||
|
sudo netstat -tlnp | grep -E "(80|3000|8080|8081|8000|8090-8095|9090)"
|
||||||
|
|
||||||
|
# Tester l'accès web
|
||||||
|
curl -I http://localhost/
|
||||||
|
curl -I http://localhost:3000/
|
||||||
|
```
|
||||||
|
|
||||||
|
## Accès aux services
|
||||||
|
|
||||||
|
### Interface web
|
||||||
|
- **IHM principale** : http://localhost/
|
||||||
|
- **Grafana** : http://localhost:3000/ (admin/admin)
|
||||||
|
- **Grafana via Nginx** : http://localhost/grafana/
|
||||||
|
|
||||||
|
### Services 4NK
|
||||||
|
- **Blindbit** : http://localhost/blindbit/
|
||||||
|
- **SDK Storage** : http://localhost/sdk_storage/
|
||||||
|
- **Relais** : http://localhost/relay1/, /relay2/, /relay3/
|
||||||
|
- **Signer** : http://localhost/signer/
|
||||||
|
- **Coffre** : http://localhost/coffre/
|
||||||
|
|
||||||
|
### WebSockets
|
||||||
|
- **Relais WS** : ws://localhost/relay1/ws/, /relay2/ws/, /relay3/ws/
|
||||||
|
- **Signer WS** : ws://localhost/signer/ws/
|
||||||
|
|
||||||
|
## Services IA (optionnel)
|
||||||
|
|
||||||
|
Pour les services d'intelligence artificielle, utiliser le repository dédié :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Cloner le repository IA
|
||||||
|
git clone https://git.4nkweb.com/4nk/4NK_IA.git
|
||||||
|
cd 4NK_IA
|
||||||
|
|
||||||
|
# Basculer sur le tag dev
|
||||||
|
git checkout dev
|
||||||
|
|
||||||
|
# Suivre les instructions d'installation dans 4NK_IA
|
||||||
|
```
|
||||||
|
|
||||||
|
## Dépannage
|
||||||
|
|
||||||
|
### Problèmes Docker
|
||||||
|
```bash
|
||||||
|
# Vérifier Docker
|
||||||
|
docker --version
|
||||||
|
docker compose version
|
||||||
|
|
||||||
|
# Redémarrer Docker
|
||||||
|
sudo systemctl restart docker
|
||||||
|
|
||||||
|
# Nettoyer les conteneurs
|
||||||
|
docker system prune -f
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problèmes de connectivité réseau
|
||||||
|
```bash
|
||||||
|
# Tester la connectivité Internet
|
||||||
|
ping -c 3 8.8.8.8
|
||||||
|
|
||||||
|
# Tester l'accès à Docker Hub
|
||||||
|
ping -c 3 registry-1.docker.io
|
||||||
|
|
||||||
|
# Tester le téléchargement d'images
|
||||||
|
docker pull hello-world
|
||||||
|
|
||||||
|
# Si les téléchargements échouent, vérifier :
|
||||||
|
# - Configuration proxy/firewall
|
||||||
|
# - DNS (essayer 8.8.8.8)
|
||||||
|
# - Connexion Internet stable
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problèmes de ports
|
||||||
|
```bash
|
||||||
|
# Vérifier les ports utilisés
|
||||||
|
sudo netstat -tlnp | grep -E "(80|3000|8080|8081|8000|8090-8095|9090)"
|
||||||
|
|
||||||
|
# Arrêter les services conflictuels
|
||||||
|
sudo systemctl stop apache2 # si Apache est installé
|
||||||
|
sudo systemctl stop nginx # pour redémarrer Nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problèmes de permissions
|
||||||
|
```bash
|
||||||
|
# Vérifier les permissions Docker
|
||||||
|
ls -la /var/run/docker.sock
|
||||||
|
|
||||||
|
# Ajouter l'utilisateur au groupe docker
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
newgrp docker
|
||||||
|
```
|
||||||
|
|
||||||
|
### Logs de diagnostic
|
||||||
|
```bash
|
||||||
|
# Logs Docker
|
||||||
|
docker compose logs [service_name]
|
||||||
|
|
||||||
|
# Logs Nginx
|
||||||
|
sudo tail -f /var/log/nginx/4nk_node.access.log
|
||||||
|
sudo tail -f /var/log/nginx/4nk_node.error.log
|
||||||
|
|
||||||
|
# Logs Grafana
|
||||||
|
sudo journalctl -u grafana-server -f
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Mise à jour
|
||||||
|
```bash
|
||||||
|
# Mettre à jour le code
|
||||||
|
git pull origin dev
|
||||||
|
|
||||||
|
# Mettre à jour les images Docker
|
||||||
|
docker compose pull
|
||||||
|
|
||||||
|
# Redémarrer les services
|
||||||
|
docker compose restart
|
||||||
|
```
|
||||||
|
|
||||||
|
### Sauvegarde
|
||||||
|
```bash
|
||||||
|
# Sauvegarder les données
|
||||||
|
tar -czf 4nk_node_backup_$(date +%Y%m%d).tar.gz modules/*/data projects/*/*/data
|
||||||
|
|
||||||
|
# Sauvegarder les configurations
|
||||||
|
tar -czf 4nk_node_config_$(date +%Y%m%d).tar.gz conf/ log/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nettoyage
|
||||||
|
```bash
|
||||||
|
# Nettoyer Docker
|
||||||
|
docker system prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
|
||||||
|
# Nettoyer les logs
|
||||||
|
sudo find log/ -name "*.log" -mtime +7 -delete
|
||||||
|
```
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Pour obtenir de l'aide :
|
||||||
|
1. Consulter la [documentation](docs/)
|
||||||
|
2. Vérifier les [issues existantes](https://git.4nkweb.com/4nk/4NK_node/issues)
|
||||||
|
3. Créer une nouvelle issue avec les détails du problème
|
||||||
|
4. Inclure les logs et la configuration utilisée
|
@ -22,6 +22,8 @@
|
|||||||
| coffre_front | coffre-front.4nk.local | 172.20.0.32 | 3003 | logs:/logs | /coffre/ → :3003 | — |
|
| 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 | — | — | — | — |
|
| 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/ | — |
|
| 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é
|
### Observabilité
|
||||||
- Promtail lit: `./log/**/*.log`, `./modules/*/logs/**/*.log`, `./projects/*/*/logs/**/*.log` et pousse vers Loki.
|
- Promtail lit: `./log/**/*.log`, `./modules/*/logs/**/*.log`, `./projects/*/*/logs/**/*.log` et pousse vers Loki.
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
## v1.1.3-dev
|
||||||
|
|
||||||
|
### Type
|
||||||
|
- Release de développement (tags `:dev` en cours de création côté images)
|
||||||
|
|
||||||
|
### Points clés
|
||||||
|
- Orchestrateur
|
||||||
|
- Réseau IPAM privé (4nk_network) avec IP/hostnames statiques.
|
||||||
|
- Réseau réservé projets (4nk_projects_net).
|
||||||
|
- Montages uniformisés conf/data/logs pour modules et projets.
|
||||||
|
- Tor/Bitcoin: utilisation d’images distantes stables; Blindbit image inchangée.
|
||||||
|
- Services internes basculés sur tag `:dev` (en attente de disponibilité).
|
||||||
|
- Observabilité
|
||||||
|
- Stack Loki/Promtail/Grafana mise en place; Promtail collecte `log/`, `modules/*/logs`, `projects/*/*/logs`.
|
||||||
|
- Grafana servi via Nginx sous `/grafana`.
|
||||||
|
- Nginx
|
||||||
|
- Reverse‑proxy unique via hostnames Docker; logs Nginx montés pour Grafana.
|
||||||
|
- Documentation
|
||||||
|
- `docs/INDEX.md`, `docs/CONFIGURATION.md`, `docs/ARCHITECTURE.md`, `docs/USAGE.md`, `docs/NETWORK.md` mis à jour.
|
||||||
|
|
||||||
|
### Remarques
|
||||||
|
- Les images internes taguées `:dev` doivent être publiées avant redémarrage complet.
|
||||||
|
- Tor peut utiliser `modules/tor/conf/tor.conf` si l’image Tor lit `/etc/tor/torrc`.
|
||||||
|
|
||||||
|
### Checklist
|
||||||
|
- [x] Orchestrateur aligné sur nouvelle arborescence
|
||||||
|
- [x] Nginx proxy + logs
|
||||||
|
- [x] Monitoring via Promtail/Loki/Grafana
|
||||||
|
- [x] Documentation mise à jour
|
||||||
|
- [x] Tag git `v1.1.3-dev`
|
||||||
# Release 1.1.3 - 2025-09-07
|
# Release 1.1.3 - 2025-09-07
|
||||||
|
|
||||||
- Mise à jour des versions `VERSION` et `TEMPLATE_VERSION`.
|
- Mise à jour des versions `VERSION` et `TEMPLATE_VERSION`.
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
## Prérequis
|
## Prérequis
|
||||||
|
|
||||||
- Docker et docker compose installés
|
- Docker et docker compose installés
|
||||||
- Nginx utilisé via le service `nginx` de l'orchestrateur
|
- Nginx installé localement (hors Docker)
|
||||||
|
- Grafana installé localement (hors Docker)
|
||||||
|
|
||||||
## Installation locale
|
## Installation locale
|
||||||
|
|
||||||
@ -13,28 +14,63 @@
|
|||||||
|
|
||||||
## Démarrage
|
## Démarrage
|
||||||
|
|
||||||
- Démarrer la stack applicative : `docker compose up -d`
|
### Services Docker
|
||||||
- Démarrer la stack de monitoring (Loki/Promtail/Grafana) si souhaité : `docker compose -f log-monitoring.yml up -d`
|
- Tester la configuration : `docker compose config --services`
|
||||||
- Accéder aux services via Nginx :
|
- Démarrer les services externes : `docker compose up -d tor bitcoin blindbit miniback-postgres`
|
||||||
- IHM: `http://localhost/`
|
- Démarrer les services 4NK : `docker compose up -d sdk_storage sdk_relay1 sdk_relay2 sdk_relay3 sdk_signer ihm_client`
|
||||||
- Blindbit: `http://localhost/blindbit/`
|
|
||||||
- SDK Storage: `http://localhost/sdk_storage/`
|
### Services locaux
|
||||||
- Relais HTTP: `http://localhost/relay1/`, `/relay2/`, `/relay3/`
|
- Démarrer Nginx local : `systemctl start nginx`
|
||||||
- Relais WebSocket: `ws://localhost/relay1/ws/` (idem `relay2`, `relay3`)
|
- Démarrer Grafana local : `systemctl start grafana-server`
|
||||||
- Signer WS: `ws://localhost/signer/ws/`; HTTP: `http://localhost/signer/`
|
|
||||||
- Coffre front: `http://localhost/coffre/`
|
### Services IA (optionnel)
|
||||||
- Grafana: `http://localhost/grafana/`
|
- Cloner le repository IA : `git clone https://git.4nkweb.com/4nk/4NK_IA.git`
|
||||||
|
- Basculer sur le tag dev : `cd 4NK_IA && git checkout dev`
|
||||||
|
- Suivre les instructions d'installation dans le repository 4NK_IA
|
||||||
|
|
||||||
|
### Accès aux services
|
||||||
|
- IHM: `http://localhost/`
|
||||||
|
- Blindbit: `http://localhost/blindbit/`
|
||||||
|
- SDK Storage: `http://localhost/sdk_storage/`
|
||||||
|
- Relais HTTP: `http://localhost/relay1/`, `/relay2/`, `/relay3/`
|
||||||
|
- Relais WebSocket: `ws://localhost/relay1/ws/` (idem `relay2`, `relay3`)
|
||||||
|
- Signer WS: `ws://localhost/signer/ws/`; HTTP: `http://localhost/signer/`
|
||||||
|
- Coffre: `http://localhost/coffre/`
|
||||||
|
- Grafana: `http://localhost:3000/` (direct) ou `http://localhost/grafana/` (via Nginx)
|
||||||
|
|
||||||
## Commandes utiles
|
## Commandes utiles
|
||||||
|
|
||||||
|
### Docker
|
||||||
- Mettre à jour les images: `docker compose pull`
|
- Mettre à jour les images: `docker compose pull`
|
||||||
- Voir les logs Nginx: `tail -f log/nginx/4nk_node.access.log`
|
|
||||||
- Voir les logs des services (montés): `tail -f modules/<service>/logs/*`
|
- Voir les logs des services (montés): `tail -f modules/<service>/logs/*`
|
||||||
- Logs Promtail/Loki/Grafana: voir `log/` et `log-monitoring.yml`
|
|
||||||
|
### Services locaux
|
||||||
|
- Voir les logs Nginx: `tail -f /var/log/nginx/4nk_node.access.log`
|
||||||
|
- Voir les logs Grafana: `journalctl -u grafana-server -f`
|
||||||
|
- Redémarrer Nginx: `systemctl restart nginx`
|
||||||
|
- Redémarrer Grafana: `systemctl restart grafana-server`
|
||||||
|
|
||||||
|
### Monitoring
|
||||||
|
- Grafana local: `http://localhost:3000/` (admin/admin)
|
||||||
|
- Logs des services Docker: montés dans `modules/*/logs/` et `projects/*/*/logs/`
|
||||||
|
- Configuration Grafana: `log/grafana-datasources.yml` et `log/grafana-dashboards.yml`
|
||||||
|
|
||||||
## Dépannage
|
## Dépannage
|
||||||
|
|
||||||
|
### Docker
|
||||||
- Vérifier les hostnames Docker internes (DNS du réseau `4nk_network`): voir `docker-compose.yml`
|
- Vérifier les hostnames Docker internes (DNS du réseau `4nk_network`): voir `docker-compose.yml`
|
||||||
- Les tags `:dev` sont en cours de création; en cas d’indisponibilité, utiliser des tags stables temporaires
|
- Les tags `:dev` sont en cours de création; en cas d'indisponibilité, utiliser des tags stables temporaires
|
||||||
- Conf Tor: `modules/tor/conf/tor.conf` est montée si l'image Tor supporte `/etc/tor/torrc`
|
- Conf Tor: `modules/tor/conf/tor.conf` est montée si l'image Tor supporte `/etc/tor/torrc`
|
||||||
- Le reverse proxy Nginx s’appuie sur les hostnames Docker (`*.4nk.local`); en cas de changement d’IP/hostnames, mettre à jour `docker-compose.yml` et relancer `nginx`.
|
|
||||||
|
### Services locaux
|
||||||
|
- Nginx: vérifier la configuration avec `nginx -t`
|
||||||
|
- Grafana: vérifier le statut avec `systemctl status grafana-server`
|
||||||
|
- Le reverse proxy Nginx pointe vers `127.0.0.1` avec les ports exposés par Docker Compose
|
||||||
|
- En cas de changement de ports dans `docker-compose.yml`, mettre à jour `conf/nginx/sites-enabled/4nk_node.conf`
|
||||||
|
|
||||||
|
## Accès depuis Windows (WSL2 ou VM Linux)
|
||||||
|
|
||||||
|
- WSL2 (Docker dans WSL): accéder via le navigateur Windows à `http://localhost/`. Si non accessible, utiliser l’IP WSL (`wsl hostname -I` côté PowerShell) et ouvrir `http://<IP_WSL>/`.
|
||||||
|
- VM Linux (Hyper‑V/VirtualBox/VMware): utiliser l’IP de la VM (`ip addr` dans la VM) et ouvrir `http://<IP_VM>/`.
|
||||||
|
- Les routes exposées par Nginx: `/`, `/blindbit/`, `/sdk_storage/`, `/relay1/`, `/relay2/`, `/relay3/`, `/signer/`, `/coffre/`, `/grafana/`.
|
||||||
|
- Services IA: voir le repository [4NK_IA](https://git.4nkweb.com/4nk/4NK_IA.git) sur le tag `dev`
|
@ -1,13 +1,12 @@
|
|||||||
apiVersion: 1
|
apiVersion: 1
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
- name: '4NK Dashboards'
|
- name: '4NK Node Dashboards'
|
||||||
orgId: 1
|
orgId: 1
|
||||||
folder: '4NK'
|
folder: '4NK Node'
|
||||||
type: file
|
type: file
|
||||||
disableDeletion: false
|
disableDeletion: false
|
||||||
editable: true
|
updateIntervalSeconds: 10
|
||||||
updateIntervalSeconds: 30
|
allowUiUpdates: true
|
||||||
options:
|
options:
|
||||||
path: /etc/grafana/provisioning/dashboards/dashboards
|
path: /etc/grafana/provisioning/dashboards/dashboards
|
||||||
EOF
|
|
@ -4,8 +4,13 @@ datasources:
|
|||||||
- name: Loki
|
- name: Loki
|
||||||
type: loki
|
type: loki
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://loki:3100
|
url: http://localhost:3100
|
||||||
isDefault: true
|
isDefault: true
|
||||||
|
editable: true
|
||||||
jsonData:
|
jsonData:
|
||||||
maxLines: 5000
|
maxLines: 1000
|
||||||
EOF
|
derivedFields:
|
||||||
|
- datasourceUid: loki
|
||||||
|
matcherRegex: "container_name=(\\w+)"
|
||||||
|
name: "Container"
|
||||||
|
url: "/d/${__value.raw}"
|
40
modules/bitcoin/conf/bitcoin.conf
Normal file
40
modules/bitcoin/conf/bitcoin.conf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Configuration globale
|
||||||
|
datadir=/home/bitcoin/.bitcoin
|
||||||
|
server=1
|
||||||
|
txindex=1
|
||||||
|
debug=1
|
||||||
|
loglevel=debug
|
||||||
|
logthreadnames=1
|
||||||
|
signet=1
|
||||||
|
onion=tor:9050
|
||||||
|
listenonion=1
|
||||||
|
|
||||||
|
# Paramètres RPC
|
||||||
|
rpcauth=bitcoin:c8ea921c7357bd6a5a8a7c43a12350a7$955e25b17672987b17c5a12f12cd8b9c1d38f0f86201c8cd47fc431f2e1c7956
|
||||||
|
rpcallowip=172.20.0.0/16
|
||||||
|
rpcworkqueue=32
|
||||||
|
rpcthreads=4
|
||||||
|
rpcdoccheck=1
|
||||||
|
|
||||||
|
# Paramètres ZMQ
|
||||||
|
zmqpubhashblock=tcp://bitcoin.local:29000
|
||||||
|
zmqpubrawtx=tcp://bitcoin.local:29000
|
||||||
|
|
||||||
|
[signet]
|
||||||
|
listen=1
|
||||||
|
bind=bitcoin.local:38333
|
||||||
|
rpcbind=bitcoin.local:18443
|
||||||
|
rpcport=18443
|
||||||
|
fallbackfee=0.0001
|
||||||
|
blockfilterindex=1
|
||||||
|
datacarriersize=205
|
||||||
|
acceptnonstdtxn=1
|
||||||
|
dustrelayfee=0.00000001
|
||||||
|
minrelaytxfee=0.00000001
|
||||||
|
prune=0
|
||||||
|
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
||||||
|
walletdir=/home/bitcoin/.bitcoin/wallets
|
||||||
|
wallet=mining
|
||||||
|
wallet=watchonly
|
||||||
|
maxtxfee=1
|
||||||
|
addnode=tlv2yqamflv22vfdzy2hha2nwmt6zrwrhjjzz4lx7qyq7lyc6wfhabyd.onion
|
@ -1,19 +1,40 @@
|
|||||||
listen=1
|
# Configuration globale
|
||||||
daemon=1
|
datadir=/home/bitcoin/.bitcoin
|
||||||
|
server=1
|
||||||
|
txindex=1
|
||||||
|
debug=1
|
||||||
|
loglevel=debug
|
||||||
|
logthreadnames=1
|
||||||
|
signet=1
|
||||||
|
onion=tor:9050
|
||||||
|
listenonion=1
|
||||||
|
|
||||||
|
# Paramètres RPC
|
||||||
|
rpcauth=bitcoin:c8ea921c7357bd6a5a8a7c43a12350a7$955e25b17672987b17c5a12f12cd8b9c1d38f0f86201c8cd47fc431f2e1c7956
|
||||||
|
rpcallowip=172.20.0.0/16
|
||||||
|
rpcworkqueue=32
|
||||||
|
rpcthreads=4
|
||||||
|
rpcdoccheck=1
|
||||||
|
|
||||||
|
# Paramètres ZMQ
|
||||||
|
zmqpubhashblock=tcp://bitcoin.local:29000
|
||||||
|
zmqpubrawtx=tcp://bitcoin.local:29000
|
||||||
|
|
||||||
[signet]
|
[signet]
|
||||||
whitelist=download@bitcoin.4nk.local
|
listen=1
|
||||||
txindex=1
|
bind=bitcoin.local:38333
|
||||||
proxy=tor.4nk.local:9050
|
rpcbind=bitcoin.local:18443
|
||||||
listenonion=1
|
rpcport=18443
|
||||||
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
|
||||||
addnode=6xi33lwwslsx3yi3f7c56wnqtdx4v73vj2up3prrwebpwbz6qisnqbyd.onion:38333
|
|
||||||
addnode=d6i546e2sjezhyy2eupyc2wqtbgjnkubcjd4prhqurtlmp7nsp6yxqyd.onion:38333
|
|
||||||
|
|
||||||
fallbackfee=0.0001
|
fallbackfee=0.0001
|
||||||
|
blockfilterindex=1
|
||||||
zmqpubrawblock=tcp://bitcoin.4nk.local:29000
|
datacarriersize=205
|
||||||
zmqpubrawtx=tcp://bitcoin.4nk.local:29000
|
acceptnonstdtxn=1
|
||||||
zmqpubhashblock=tcp://bitcoin.4nk.local:29000
|
dustrelayfee=0.00000001
|
||||||
|
minrelaytxfee=0.00000001
|
||||||
blockfilterindex=1
|
prune=0
|
||||||
|
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
||||||
|
walletdir=/home/bitcoin/.bitcoin/wallets
|
||||||
|
wallet=mining
|
||||||
|
wallet=watchonly
|
||||||
|
maxtxfee=1
|
||||||
|
addnode=tlv2yqamflv22vfdzy2hha2nwmt6zrwrhjjzz4lx7qyq7lyc6wfhabyd.onion
|
||||||
|
0
modules/bitcoin/data/.gitkeep
Normal file
0
modules/bitcoin/data/.gitkeep
Normal file
0
modules/bitcoin/logs/.gitkeep
Normal file
0
modules/bitcoin/logs/.gitkeep
Normal file
28
modules/blindbit-oracle/conf/blindbit.toml.exemple
Normal file
28
modules/blindbit-oracle/conf/blindbit.toml.exemple
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Configuration pour blindbit-oracle
|
||||||
|
host = "blindbit-oracle.local:8000"
|
||||||
|
|
||||||
|
# Définit la chaîne sur laquelle le wallet fonctionne
|
||||||
|
chain = "signet"
|
||||||
|
|
||||||
|
# Point d'accès RPC Bitcoin
|
||||||
|
rpc_endpoint = "http://bitcoin.local:38332"
|
||||||
|
|
||||||
|
# Chemin vers le fichier cookie RPC Bitcoin
|
||||||
|
cookie_path = "/home/bitcoin/.bitcoin/signet/.cookie"
|
||||||
|
|
||||||
|
# Identifiants RPC Bitcoin (non utilisés avec cookie_path)
|
||||||
|
rpc_user = ""
|
||||||
|
rpc_pass = ""
|
||||||
|
|
||||||
|
# Hauteur de départ pour la synchronisation
|
||||||
|
sync_start_height = 1
|
||||||
|
|
||||||
|
# Paramètres de performance
|
||||||
|
max_parallel_tweak_computations = 4
|
||||||
|
max_parallel_requests = 4
|
||||||
|
|
||||||
|
# Configuration des index
|
||||||
|
tweaks_only = 0
|
||||||
|
tweaks_full_basic = 1
|
||||||
|
tweaks_full_with_dust_filter = 1
|
||||||
|
tweaks_cut_through_with_dust_filter = 1
|
0
modules/blindbit-oracle/data/.gitkeep
Normal file
0
modules/blindbit-oracle/data/.gitkeep
Normal file
0
modules/blindbit-oracle/logs/.gitkeep
Normal file
0
modules/blindbit-oracle/logs/.gitkeep
Normal file
@ -1,50 +0,0 @@
|
|||||||
# 0.0.0.0:8000 to expose outside of localhost
|
|
||||||
# default: "127.0.0.1:8000"
|
|
||||||
host = "blindbit.4nk.local:8000"
|
|
||||||
|
|
||||||
# Defines on which chain the wallet runs. Allowed values: main, testnet, signet, regtest.
|
|
||||||
# default: signet
|
|
||||||
chain = "signet"
|
|
||||||
|
|
||||||
# default: http://bitcoin.4nk.local:8332
|
|
||||||
rpc_endpoint = "http://bitcoin.4nk.local:38332"
|
|
||||||
|
|
||||||
# required, unless rpc_user and rpc_pass are set
|
|
||||||
cookie_path = "$HOME/.bitcoin/signet/.cookie"
|
|
||||||
|
|
||||||
# required, unless cookie_path is set
|
|
||||||
rpc_pass = ""
|
|
||||||
|
|
||||||
# required, unless cookie_path is set
|
|
||||||
rpc_user = ""
|
|
||||||
|
|
||||||
# required (has to be >= 1)
|
|
||||||
sync_start_height = 1
|
|
||||||
|
|
||||||
# the default for this is 1, but should be set to a higher value to increase performance,
|
|
||||||
# one should set this in accordance to how many cores one wants to use
|
|
||||||
max_parallel_tweak_computations = 4
|
|
||||||
|
|
||||||
# (depends on max-rpc-workers of the underlying full node)
|
|
||||||
max_parallel_requests = 4
|
|
||||||
|
|
||||||
# optional - will only generate tweaks (still both cut-through and full-index)
|
|
||||||
# default: 0
|
|
||||||
tweaks_only = 0
|
|
||||||
|
|
||||||
# The base index. Only includes the tweaks. No dust filtering or cut-through possible
|
|
||||||
# default: 1
|
|
||||||
tweaks_full_basic = 1
|
|
||||||
|
|
||||||
# if this is set a full non-cut-through index will be created.
|
|
||||||
# This index can be used to filter for dust (?dustLimit=). If this is active the base index will not be created.
|
|
||||||
# All full index queries will be served from this with or without (?dustLimit=) set in the query.
|
|
||||||
# default 0
|
|
||||||
tweaks_full_with_dust_filter = 0
|
|
||||||
|
|
||||||
# This index applies cut-through and dust filtering.
|
|
||||||
# Beware that it will be stored in addition to any full index (with or without dust) if activated.
|
|
||||||
# It has more storage requirements than the simple indices.
|
|
||||||
# Currently still requires tweaks_only=0.
|
|
||||||
# default: 0
|
|
||||||
tweaks_cut_through_with_dust_filter = 0
|
|
@ -1,50 +0,0 @@
|
|||||||
# 0.0.0.0:8000 to expose outside of localhost
|
|
||||||
# default: "127.0.0.1:8000"
|
|
||||||
host = "blindbit.4nk.local:8000"
|
|
||||||
|
|
||||||
# Defines on which chain the wallet runs. Allowed values: main, testnet, signet, regtest.
|
|
||||||
# default: signet
|
|
||||||
chain = "signet"
|
|
||||||
|
|
||||||
# default: http://bitcoin.4nk.local:8332
|
|
||||||
rpc_endpoint = "http://bitcoin.4nk.local:38332"
|
|
||||||
|
|
||||||
# required, unless rpc_user and rpc_pass are set
|
|
||||||
cookie_path = "$HOME/.bitcoin/signet/.cookie"
|
|
||||||
|
|
||||||
# required, unless cookie_path is set
|
|
||||||
rpc_pass = ""
|
|
||||||
|
|
||||||
# required, unless cookie_path is set
|
|
||||||
rpc_user = ""
|
|
||||||
|
|
||||||
# required (has to be >= 1)
|
|
||||||
sync_start_height = 1
|
|
||||||
|
|
||||||
# the default for this is 1, but should be set to a higher value to increase performance,
|
|
||||||
# one should set this in accordance to how many cores one wants to use
|
|
||||||
max_parallel_tweak_computations = 4
|
|
||||||
|
|
||||||
# (depends on max-rpc-workers of the underlying full node)
|
|
||||||
max_parallel_requests = 4
|
|
||||||
|
|
||||||
# optional - will only generate tweaks (still both cut-through and full-index)
|
|
||||||
# default: 0
|
|
||||||
tweaks_only = 0
|
|
||||||
|
|
||||||
# The base index. Only includes the tweaks. No dust filtering or cut-through possible
|
|
||||||
# default: 1
|
|
||||||
tweaks_full_basic = 1
|
|
||||||
|
|
||||||
# if this is set a full non-cut-through index will be created.
|
|
||||||
# This index can be used to filter for dust (?dustLimit=). If this is active the base index will not be created.
|
|
||||||
# All full index queries will be served from this with or without (?dustLimit=) set in the query.
|
|
||||||
# default 0
|
|
||||||
tweaks_full_with_dust_filter = 0
|
|
||||||
|
|
||||||
# This index applies cut-through and dust filtering.
|
|
||||||
# Beware that it will be stored in addition to any full index (with or without dust) if activated.
|
|
||||||
# It has more storage requirements than the simple indices.
|
|
||||||
# Currently still requires tweaks_only=0.
|
|
||||||
# default: 0
|
|
||||||
tweaks_cut_through_with_dust_filter = 0
|
|
@ -1,7 +0,0 @@
|
|||||||
const U32_MAX = import.meta.env.U32_MAX;
|
|
||||||
const BASEURL = import.meta.env.DEV.BASEURL;
|
|
||||||
const BOOTSTRAPURL = import.meta.env.DEV.BOOTSTRAPURL;
|
|
||||||
const STORAGEURL = import.meta.env.DEV.STORAGEURL;
|
|
||||||
const BLINDBITURL = import.meta.env.DEV.BLINDBITURL;
|
|
||||||
const DEFAULTAMOUNT = import.meta.env.DEV.DEFAULTAMOUNT;
|
|
||||||
const EMPTY32BYTES = import.meta.env.DEV.EMPTY32BYTES;
|
|
@ -1,7 +0,0 @@
|
|||||||
const U32_MAX = import.meta.env.U32_MAX;
|
|
||||||
const BASEURL = import.meta.env.DEV.BASEURL;
|
|
||||||
const BOOTSTRAPURL = import.meta.env.DEV.BOOTSTRAPURL;
|
|
||||||
const STORAGEURL = import.meta.env.DEV.STORAGEURL;
|
|
||||||
const BLINDBITURL = import.meta.env.DEV.BLINDBITURL;
|
|
||||||
const DEFAULTAMOUNT = import.meta.env.DEV.DEFAULTAMOUNT;
|
|
||||||
const EMPTY32BYTES = import.meta.env.DEV.EMPTY32BYTES;
|
|
0
modules/ihm_client/data/.gitkeep
Normal file
0
modules/ihm_client/data/.gitkeep
Normal file
0
modules/ihm_client/logs/.gitkeep
Normal file
0
modules/ihm_client/logs/.gitkeep
Normal file
0
modules/local_IA/.gitkeep
Normal file
0
modules/local_IA/.gitkeep
Normal file
0
modules/local_IA/conf/.gitkeep
Normal file
0
modules/local_IA/conf/.gitkeep
Normal file
0
modules/local_IA/data/.gitkeep
Normal file
0
modules/local_IA/data/.gitkeep
Normal file
0
modules/local_IA/logs/.gitkeep
Normal file
0
modules/local_IA/logs/.gitkeep
Normal file
0
modules/local_IA/scripts/.gitkeep
Normal file
0
modules/local_IA/scripts/.gitkeep
Normal file
@ -1,6 +1,9 @@
|
|||||||
core_url="http://bitcoin.4nk.local:38332"
|
core_url="http://bitcoin:38332"
|
||||||
ws_url="sdk-relay1.4nk.local:8090"
|
ws_url="sdk-relay1.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit.4nk.local:8000"
|
blindbit_url="http://blindbit-oracle.local:8000"
|
||||||
zmq_url="tcp://bitcoin.4nk.local:29000"
|
zmq_url="tcp://bitcoin:29000"
|
||||||
|
storage="https://sdk-storage.local/storage"
|
||||||
|
data_dir="/home/bitcoin/.4nk"
|
||||||
|
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
0
modules/sdk_relay1/data/.gitkeep
Normal file
0
modules/sdk_relay1/data/.gitkeep
Normal file
0
modules/sdk_relay1/logs/.gitkeep
Normal file
0
modules/sdk_relay1/logs/.gitkeep
Normal file
@ -1,6 +1,9 @@
|
|||||||
core_url="http://bitcoin.4nk.local:38332"
|
core_url="http://bitcoin:38332"
|
||||||
ws_url="sdk-relay2.4nk.local:8090"
|
ws_url="sdk-relay2.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit.4nk.local:8000"
|
blindbit_url="http://blindbit-oracle.local:8000"
|
||||||
zmq_url="tcp://bitcoin.4nk.local:29000"
|
zmq_url="tcp://bitcoin:29000"
|
||||||
|
storage="https://sdk-storage.local/storage"
|
||||||
|
data_dir="/home/bitcoin/.4nk"
|
||||||
|
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
0
modules/sdk_relay2/data/.gitkeep
Normal file
0
modules/sdk_relay2/data/.gitkeep
Normal file
0
modules/sdk_relay2/logs/.gitkeep
Normal file
0
modules/sdk_relay2/logs/.gitkeep
Normal file
@ -1,6 +1,9 @@
|
|||||||
core_url="http://bitcoin.4nk.local:38332"
|
core_url="http://bitcoin:38332"
|
||||||
ws_url="sdk-relay3.4nk.local:8090"
|
ws_url="sdk-relay3.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit.4nk.local:8000"
|
blindbit_url="http://blindbit-oracle.local:8000"
|
||||||
zmq_url="tcp://bitcoin.4nk.local:29000"
|
zmq_url="tcp://bitcoin:29000"
|
||||||
|
storage="https://sdk-storage.local/storage"
|
||||||
|
data_dir="/home/bitcoin/.4nk"
|
||||||
|
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
0
modules/sdk_relay3/data/.gitkeep
Normal file
0
modules/sdk_relay3/data/.gitkeep
Normal file
0
modules/sdk_relay3/logs/.gitkeep
Normal file
0
modules/sdk_relay3/logs/.gitkeep
Normal file
@ -5,10 +5,10 @@ ws_port = 9090
|
|||||||
http_port = 9092
|
http_port = 9092
|
||||||
|
|
||||||
# URLs des services
|
# URLs des services
|
||||||
relay_urls = ["http://4nk-sdk-relay1:8091", "http://4nk-sdk-relay2:8093", "http://4nk-sdk-relay3:8095"]
|
relay_urls = ["http://sdk-relay1.local:8091", "http://sdk-relay2.local:8093", "http://sdk-relay3.local:8095"]
|
||||||
storage_url = "http://4nk-sdk-storage:8081"
|
storage_url = "http://sdk-storage.local:8081"
|
||||||
blindbit_url = "http://4nk-blindbit:8000"
|
blindbit_url = "http://blindbit-core.local:8000"
|
||||||
bitcoin_rpc_url = "http://4nk-bitcoin:38332"
|
bitcoin_rpc_url = "http://bitcoin.local:38332"
|
||||||
|
|
||||||
# Authentification Bitcoin
|
# Authentification Bitcoin
|
||||||
bitcoin_rpc_user = "bitcoin"
|
bitcoin_rpc_user = "bitcoin"
|
||||||
@ -24,7 +24,7 @@ timeout = 30
|
|||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_level = "info"
|
log_level = "info"
|
||||||
log_file = "$HOME/bitcoin/logs/sdk_signer.log"
|
log_file = "/home/bitcoin/logs/sdk_signer.log"
|
||||||
|
|
||||||
# Sécurité
|
# Sécurité
|
||||||
enable_tls = false
|
enable_tls = false
|
0
modules/sdk_signer/data/.gitkeep
Normal file
0
modules/sdk_signer/data/.gitkeep
Normal file
BIN
modules/sdk_signer/data/000005.ldb
Normal file
BIN
modules/sdk_signer/data/000005.ldb
Normal file
Binary file not shown.
1
modules/sdk_signer/data/CURRENT
Normal file
1
modules/sdk_signer/data/CURRENT
Normal file
@ -0,0 +1 @@
|
|||||||
|
MANIFEST-000517
|
0
modules/sdk_signer/data/LOCK
Normal file
0
modules/sdk_signer/data/LOCK
Normal file
3
modules/sdk_signer/data/LOG
Normal file
3
modules/sdk_signer/data/LOG
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
2025/09/10-16:33:07.003716 7fdbf603cb38 Recovering log #516
|
||||||
|
2025/09/10-16:33:07.019125 7fdbf603cb38 Delete type=0 #516
|
||||||
|
2025/09/10-16:33:07.019162 7fdbf603cb38 Delete type=3 #515
|
3
modules/sdk_signer/data/LOG.old
Normal file
3
modules/sdk_signer/data/LOG.old
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
2025/09/10-16:32:35.916719 7f0ece79cb38 Recovering log #514
|
||||||
|
2025/09/10-16:32:35.932279 7f0ece79cb38 Delete type=0 #514
|
||||||
|
2025/09/10-16:32:35.932310 7f0ece79cb38 Delete type=3 #513
|
BIN
modules/sdk_signer/data/MANIFEST-000517
Normal file
BIN
modules/sdk_signer/data/MANIFEST-000517
Normal file
Binary file not shown.
0
modules/sdk_signer/log/.gitkeep
Normal file
0
modules/sdk_signer/log/.gitkeep
Normal file
@ -1,14 +1,14 @@
|
|||||||
# Configuration sdk_storage - Module 4NK_node
|
# Configuration sdk_storage - Module 4NK_node
|
||||||
|
|
||||||
# Port d'écoute
|
# Port d'écoute
|
||||||
http_port = 8081
|
http_port = 8080
|
||||||
|
|
||||||
# Base de données
|
# Base de données
|
||||||
db_path = "$HOME/bitcoin/.4nk/storage.db"
|
db_path = "/home/bitcoin/.4nk/storage.db"
|
||||||
|
|
||||||
# URLs des services
|
# URLs des services
|
||||||
relay_urls = ["http://4nk-sdk-relay1:8091", "http://4nk-sdk-relay2:8093", "http://4nk-sdk-relay3:8095"]
|
relay_urls = ["http://sdk-relay1.local:8091", "http://sdk-relay2.local:8093", "http://4nk-sdk-relay3:8095"]
|
||||||
bitcoin_rpc_url = "http://4nk-bitcoin:38332"
|
bitcoin_rpc_url = "http://bitcoin.local:38332"
|
||||||
bitcoin_rpc_user = "bitcoin"
|
bitcoin_rpc_user = "bitcoin"
|
||||||
bitcoin_rpc_password = "bitcoin"
|
bitcoin_rpc_password = "bitcoin"
|
||||||
|
|
||||||
@ -22,10 +22,10 @@ timeout = 30
|
|||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_level = "info"
|
log_level = "info"
|
||||||
log_file = "$HOME/bitcoin/logs/sdk_storage.log"
|
log_file = "/home/bitcoin/logs/sdk_storage.log"
|
||||||
|
|
||||||
# Stockage de fichiers
|
# Stockage de fichiers
|
||||||
file_storage_path = "$HOME/bitcoin/.4nk/files"
|
file_storage_path = "/home/bitcoin/.4nk/files"
|
||||||
max_file_size = "100MB"
|
max_file_size = "100MB"
|
||||||
|
|
||||||
# Sécurité
|
# Sécurité
|
||||||
|
0
modules/sdk_storage/data/.gitkeep
Normal file
0
modules/sdk_storage/data/.gitkeep
Normal file
0
modules/sdk_storage/log/.gitkeep
Normal file
0
modules/sdk_storage/log/.gitkeep
Normal file
@ -3,8 +3,8 @@
|
|||||||
# Ports d\écoute
|
# Ports d\écoute
|
||||||
|
|
||||||
# Ports d\'écoute
|
# Ports d\'écoute
|
||||||
SocksPort tor.4nk.local:9050
|
SocksPort tor.local:9050
|
||||||
ControlPort tor.4nk.local:9051
|
ControlPort tor.local:9051
|
||||||
|
|
||||||
# Répertoires
|
# Répertoires
|
||||||
DataDirectory /var/lib/tor
|
DataDirectory /var/lib/tor
|
||||||
|
0
modules/tor/data/.gitkeep
Normal file
0
modules/tor/data/.gitkeep
Normal file
0
modules/tor/log/.gitkeep
Normal file
0
modules/tor/log/.gitkeep
Normal file
@ -1,50 +1,50 @@
|
|||||||
# Configuration OVH
|
# Configuration OVH
|
||||||
OVH_APP_KEY=5ab0709bbb65ef26
|
OVH_APP_KEY=
|
||||||
OVH_APP_SECRET=de1fac1779d707d263a611a557cd5766
|
OVH_APP_SECRET=
|
||||||
OVH_CONSUMER_KEY=5fe817829b8a9c780cfa2354f8312ece
|
OVH_CONSUMER_KEY=
|
||||||
OVH_SMS_SERVICE_NAME=sms-tt802880-1
|
OVH_SMS_SERVICE_NAME=sms-tt802880-1
|
||||||
|
|
||||||
# Configuration SMS Factor
|
# Configuration SMS Factor
|
||||||
SMS_FACTOR_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4NzgzNiIsImlhdCI6MTcwMTMzOTY1Mi45NDUzOH0.GNoqLb5MDBWuniNlQjbr1PKolwxGqBZe_tf4IMObvHw
|
SMS_FACTOR_TOKEN=
|
||||||
|
|
||||||
#Configuration Mailchimp
|
#Configuration Mailchimp
|
||||||
MAILCHIMP_API_KEY=md-VVfaml-ApIV4nsGgaJKl0A
|
MAILCHIMP_API_KEY=
|
||||||
MAILCHIMP_KEY=3fa54304bc766dfd0b8043a827b28a3a-us17
|
MAILCHIMP_KEY=
|
||||||
MAILCHIMP_LIST_ID=a48d9ad852
|
MAILCHIMP_LIST_ID=
|
||||||
|
|
||||||
#Configuration Stripe
|
#Configuration Stripe
|
||||||
STRIPE_SECRET_KEY=sk_test_51OwKmMP5xh1u9BqSeFpqw0Yr15hHtFsh0pvRGaE0VERhlYtvw33ND1qiGA6Dy1DPmmV61B6BqIimlhuv7bwElhjF00PLQwD60n
|
STRIPE_SECRET_KEY=
|
||||||
STRIPE_WEBHOOK_SECRET=
|
STRIPE_WEBHOOK_SECRET=
|
||||||
STRIPE_STANDARD_SUBSCRIPTION_PRICE_ID=price_1P66fuP5xh1u9BqSHj0O6Uy3
|
STRIPE_STANDARD_SUBSCRIPTION_PRICE_ID=
|
||||||
STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NsRP5xh1u9BqSFgkUDbQY
|
STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
||||||
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=price_1P66RqP5xh1u9BqSuUzkQNac
|
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=
|
||||||
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NpKP5xh1u9BqSApFogvUB
|
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
||||||
|
|
||||||
# Configuration serveur
|
# Configuration serveur
|
||||||
APP_HOST=http://miniback.4nk.local
|
APP_HOST=http://coffre-back-mini.local
|
||||||
PORT=8080
|
PORT=8080
|
||||||
|
|
||||||
# Configuration front-end
|
# Configuration front-end
|
||||||
NEXT_PUBLIC_4NK_URL=https://ihm-client.4nk.local
|
NEXT_PUBLIC_4NK_URL=http://ihm-client.local
|
||||||
NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.4nk.local:3000
|
NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.local:3000
|
||||||
NEXT_PUBLIC_IDNOT_BASE_URL=https://qual-connexion.idnot.fr
|
NEXT_PUBLIC_IDNOT_BASE_URL=https://qual-connexion.idnot.fr
|
||||||
NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT=/IdPOAuth2/authorize/idnot_idp_v1
|
NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT=/IdPOAuth2/authorize/idnot_idp_v1
|
||||||
NEXT_PUBLIC_IDNOT_CLIENT_ID=4501646203F3EF67
|
NEXT_PUBLIC_IDNOT_CLIENT_ID=
|
||||||
NEXT_PUBLIC_BACK_API_PROTOCOL=http
|
NEXT_PUBLIC_BACK_API_PROTOCOL=http
|
||||||
NEXT_PUBLIC_BACK_API_HOST=miniback.4nk.local
|
NEXT_PUBLIC_BACK_API_HOST=localhost
|
||||||
BACK_API_PORT=8080
|
BACK_API_PORT=8080
|
||||||
BACK_API_ROOT_URL=/api
|
BACK_API_ROOT_URL=/api
|
||||||
BACK_API_VERSION=/v1
|
BACK_API_VERSION=/v1
|
||||||
|
|
||||||
# Configuration idnot
|
# Configuration idnot
|
||||||
IDNOT_ANNUARY_BASE_URL='https://qual-api.notaires.fr/annuaire'
|
IDNOT_ANNUARY_BASE_URL='https://qual-api.notaires.fr/annuaire'
|
||||||
IDNOT_API_KEY='ba557f84-0bf6-4dbf-844f-df2767555e3e'
|
IDNOT_API_KEY=''
|
||||||
|
|
||||||
# Configuration PostgreSQL
|
# Configuration PostgreSQL
|
||||||
DB_HOST=
|
DB_HOST=miniback-postgres.local
|
||||||
DB_PORT=
|
DB_PORT=5432
|
||||||
DB_NAME=
|
DB_NAME=miniback
|
||||||
DB_USER=
|
DB_USER=miniback
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=minibackpassword
|
||||||
|
|
||||||
LOG_LEVEL="debug"
|
LOG_LEVEL="debug"
|
0
projects/lecoffre/lecoffre-back-mini/data/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-back-mini/data/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-back-mini/logs/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-back-mini/logs/.gitkeep
Normal file
@ -1,10 +1,10 @@
|
|||||||
EXT_PUBLIC_4NK_URL="http://ihm-client.4nk.local:3003"
|
NEXT_PUBLIC_4NK_URL="http://ihm-client.local:3003"
|
||||||
NEXT_PUBLIC_FRONT_APP_HOST="http://coffre-front.4nk.local:3000"
|
NEXT_PUBLIC_FRONT_APP_HOST="http://coffre-front.local:3000"
|
||||||
NEXT_PUBLIC_IDNOT_BASE_URL="https://qual-connexion.idnot.fr"
|
NEXT_PUBLIC_IDNOT_BASE_URL="https://qual-connexion.idnot.fr"
|
||||||
NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT="/IdPOAuth2/authorize/idnot_idp_v1"
|
NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT="/IdPOAuth2/authorize/idnot_idp_v1"
|
||||||
NEXT_PUBLIC_IDNOT_CLIENT_ID="4501646203F3EF67"
|
NEXT_PUBLIC_IDNOT_CLIENT_ID=""
|
||||||
NEXT_PUBLIC_BACK_API_PROTOCOL=http://
|
NEXT_PUBLIC_BACK_API_PROTOCOL=http://
|
||||||
NEXT_PUBLIC_BACK_API_HOST=miniback.4nk.local
|
NEXT_PUBLIC_BACK_API_HOST=localhost
|
||||||
NEXT_PUBLIC_BACK_API_PORT=8080
|
NEXT_PUBLIC_BACK_API_PORT=8080
|
||||||
NEXT_PUBLIC_BACK_API_ROOT_URL=/api
|
NEXT_PUBLIC_BACK_API_ROOT_URL=/api
|
||||||
NEXT_PUBLIC_BACK_API_VERSION=/v1
|
NEXT_PUBLIC_BACK_API_VERSION=/v1
|
0
projects/lecoffre/lecoffre-front/data/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-front/data/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-front/logs/.gitkeep
Normal file
0
projects/lecoffre/lecoffre-front/logs/.gitkeep
Normal file
60
scripts/start-dnsmasq.sh
Executable file
60
scripts/start-dnsmasq.sh
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script de démarrage dnsmasq pour 4NK
|
||||||
|
# Résout les noms Docker 4NK sur le port 5353
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||||
|
DNSMASQ_CONF="$PROJECT_ROOT/conf/dnsmasq/dnsmasq.conf"
|
||||||
|
DNSMASQ_BIN="$(command -v dnsmasq || echo /usr/sbin/dnsmasq)"
|
||||||
|
|
||||||
|
echo "🚀 Démarrage dnsmasq pour 4NK..."
|
||||||
|
|
||||||
|
# Vérifier que la configuration existe
|
||||||
|
if [ ! -f "$DNSMASQ_CONF" ]; then
|
||||||
|
echo "❌ Configuration dnsmasq non trouvée: $DNSMASQ_CONF"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Arrêter dnsmasq s'il tourne déjà
|
||||||
|
if pgrep -f "dnsmasq.*5353" > /dev/null; then
|
||||||
|
echo "🛑 Arrêt dnsmasq existant..."
|
||||||
|
pkill -f "dnsmasq.*5353" || true
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Démarrer dnsmasq avec la configuration 4NK
|
||||||
|
echo "🔧 Démarrage dnsmasq sur le port 5353..."
|
||||||
|
"$DNSMASQ_BIN" --conf-file="$DNSMASQ_CONF" --no-daemon &
|
||||||
|
|
||||||
|
DNSMASQ_PID=$!
|
||||||
|
echo "✅ dnsmasq démarré avec PID: $DNSMASQ_PID"
|
||||||
|
|
||||||
|
# Tester la résolution
|
||||||
|
echo "🧪 Test de résolution DNS..."
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
# Test des noms Docker
|
||||||
|
for hostname in "tor.4nk.local" "bitcoin.4nk.local" "coffre-front.4nk.local"; do
|
||||||
|
echo -n " Test $hostname: "
|
||||||
|
if nslookup -port=5353 "$hostname" 127.0.0.1 > /dev/null 2>&1; then
|
||||||
|
echo "✅ OK"
|
||||||
|
else
|
||||||
|
echo "❌ Échec"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "📋 Configuration dnsmasq:"
|
||||||
|
echo " - Port: 5353"
|
||||||
|
echo " - Interface: 127.0.0.1"
|
||||||
|
echo " - Configuration: $DNSMASQ_CONF"
|
||||||
|
echo " - PID: $DNSMASQ_PID"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "🔧 Pour utiliser dnsmasq, configurez votre système:"
|
||||||
|
echo " - Ajoutez 'nameserver 127.0.0.1' dans /etc/resolv.conf"
|
||||||
|
echo " - Ou utilisez: nslookup -port=5353 <nom> 127.0.0.1"
|
||||||
|
echo ""
|
||||||
|
echo "🛑 Pour arrêter: kill $DNSMASQ_PID"
|
49
tests/connectivity/check_http_endpoints.sh
Executable file
49
tests/connectivity/check_http_endpoints.sh
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
hostnames=(
|
||||||
|
tor.local
|
||||||
|
bitcoin.local
|
||||||
|
blindbit-oracle.local
|
||||||
|
sdk-storage.local
|
||||||
|
sdk-relay1.local
|
||||||
|
sdk-relay2.local
|
||||||
|
sdk-relay3.local
|
||||||
|
sdk-signer.local
|
||||||
|
ihm-client.local
|
||||||
|
miniback-postgres.local
|
||||||
|
coffre-front.local
|
||||||
|
coffre-back-mini.local
|
||||||
|
)
|
||||||
|
|
||||||
|
# Vérifier la résolution DNS via dnsmasq (127.0.0.1:5353)
|
||||||
|
for h in "${hostnames[@]}"; do
|
||||||
|
if nslookup -port=5353 "$h" 127.0.0.1 >/dev/null 2>&1; then
|
||||||
|
echo "DNS OK $h"
|
||||||
|
else
|
||||||
|
echo "DNS NOK $h"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
declare -A ports=(
|
||||||
|
[blindbit-oracle.local]=8000
|
||||||
|
[sdk-storage.local]=8080
|
||||||
|
[sdk-relay1.local]=8090
|
||||||
|
[sdk-relay2.local]=8090
|
||||||
|
[sdk-relay3.local]=8090
|
||||||
|
[sdk-signer.local]=9090
|
||||||
|
[ihm-client.local]=80
|
||||||
|
)
|
||||||
|
|
||||||
|
fail=0
|
||||||
|
for host in "${!ports[@]}"; do
|
||||||
|
url="http://$host:${ports[$host]}"
|
||||||
|
if wget --quiet --tries=1 --timeout=5 --spider "$url"; then
|
||||||
|
echo "HTTP OK $url"
|
||||||
|
else
|
||||||
|
echo "HTTP NOK $url"
|
||||||
|
fail=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $fail
|
Loading…
x
Reference in New Issue
Block a user