Compare commits
No commits in common. "dev" and "main" have entirely different histories.
@ -15,15 +15,6 @@ 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,31 +11,6 @@ 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
Normal file
8
.gitmodules
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[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,39 +1,11 @@
|
|||||||
## Changed (2025-09-10)
|
## Changed (2025-09-08)
|
||||||
# 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
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
# 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=/coffre-front.local/172.20.0.32
|
|
||||||
address=/coffre-back-mini.local/172.20.0.33
|
|
@ -3,50 +3,51 @@ version: '3.8'
|
|||||||
# Updated to use newer Go-based images for builds; placeholder for future dynamic tag adjustments
|
# Updated to use newer Go-based images for builds; placeholder for future dynamic tag adjustments
|
||||||
|
|
||||||
services:
|
services:
|
||||||
tor.local:
|
tor:
|
||||||
image: dperson/torproxy:latest
|
image: torproject/tor:latest
|
||||||
container_name: tor.local
|
container_name: 4nk-tor
|
||||||
hostname: tor.local
|
hostname: tor.4nk.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
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
bitcoin.local:
|
bitcoin:
|
||||||
image: ruimarinho/bitcoin-core:latest
|
image: ruimarinho/bitcoin-core:latest
|
||||||
container_name: bitcoin.local
|
container_name: 4nk-bitcoin
|
||||||
hostname: bitcoin.local
|
hostname: bitcoin.4nk.local
|
||||||
ports:
|
ports:
|
||||||
|
- "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
|
- ./modules/bitcoin/conf/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf:ro
|
||||||
- ./modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs
|
- ./modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.11
|
ipv4_address: 172.20.0.11
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- tor.local
|
- tor
|
||||||
|
|
||||||
blindbit-oracle.local:
|
blindbit:
|
||||||
image: git.4nkweb.com/4nk/blindbit-oracle:dev
|
image: 4nk-node-blindbit:latest
|
||||||
container_name: blindbit-oracle.local
|
container_name: 4nk-blindbit
|
||||||
hostname: blindbit-oracle.local
|
hostname: blindbit.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- HOST=blindbit-oracle.local:8000
|
- HOST=0.0.0.0:8000
|
||||||
- CHAIN="signet"
|
- CHAIN=signet
|
||||||
- RPC_ENDPOINT="http://bitcoin.local:38332"
|
|
||||||
- COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
- RPC_USER=""
|
|
||||||
- RPC_PASS=""
|
|
||||||
- SYNC_START_HEIGHT=1
|
- SYNC_START_HEIGHT=1
|
||||||
- MAX_PARALLEL_TWEAK_COMPUTATIONS=4
|
- MAX_PARALLEL_TWEAK_COMPUTATIONS=4
|
||||||
- MAX_PARALLEL_REQUESTS=4
|
- MAX_PARALLEL_REQUESTS=4
|
||||||
@ -54,44 +55,31 @@ 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
|
||||||
- host="blindbit-oracle.local:8000"
|
command: ["/main", "--datadir", "/blindbit"]
|
||||||
- chain="signet"
|
|
||||||
- rpc_endpoint="http://bitcoin.local:38332"
|
|
||||||
- cookie_path="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
- rpc_user=""
|
|
||||||
- rpc_pass=""
|
|
||||||
- sync_start_height=1
|
|
||||||
- max_parallel_tweak_computations=4
|
|
||||||
- max_parallel_requests=4
|
|
||||||
- tweaks_only=0
|
|
||||||
- tweaks_full_basic=1
|
|
||||||
- tweaks_full_with_dust_filter=1
|
|
||||||
- tweaks_cut_through_with_dust_filter=1
|
|
||||||
command: [ "/main", "--datadir", "/blindbit-oracle" ]
|
|
||||||
working_dir: /
|
working_dir: /
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/blindbit-oracle/conf/blindbit.toml:/blindbit-oracle/blindbit.toml:ro
|
- ./modules/blindbit/conf/blindbit.toml:/blindbit/blindbit.toml:ro
|
||||||
- ./modules/blindbit-oracle/data:/blindbit-oracle
|
- ./modules/blindbit/data:/blindbit
|
||||||
- ./modules/blindbit-oracle/logs:/blindbit-oracle/logs
|
- ./modules/blindbit/logs:/blindbit/logs
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
ipv4_address: 172.20.0.12
|
ipv4_address: 172.20.0.12
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- bitcoin.local
|
- 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.local:
|
sdk_storage:
|
||||||
image: git.4nkweb.com/4nk/sdk_storage:dev
|
image: 4nk-node-sdk_storage:dev
|
||||||
container_name: sdk-storage.local
|
container_name: 4nk-sdk-storage
|
||||||
hostname: sdk-storage.local
|
hostname: sdk-storage.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8081:8080"
|
- "8081:8081"
|
||||||
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
|
||||||
@ -99,27 +87,25 @@ 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:8080" ]
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8081"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay1.local:
|
sdk_relay1:
|
||||||
image: git.4nkweb.com/4nk/sdk_relay:dev
|
image: 4nk-node-sdk_relay1:dev
|
||||||
container_name: sdk-relay1.local
|
container_name: 4nk-sdk-relay1
|
||||||
hostname: sdk-relay1.local
|
hostname: sdk-relay1.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8090:8090"
|
- "8090:8090"
|
||||||
- "8091:8091"
|
- "8091:8091"
|
||||||
environment:
|
environment:
|
||||||
- RELAY_RPC_USER=""
|
- RELAY_RPC_USER=bitcoin
|
||||||
- RELAY_RPC_PASSWORD=""
|
- RELAY_RPC_PASSWORD=bitcoin
|
||||||
- COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
- relay_rpc_user=""
|
|
||||||
- relay_rpc_password=""
|
|
||||||
- cookie_path="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/sdk_relay1/conf/sdk_relay1.conf:/home/bitcoin/.conf:ro
|
- ./modules/sdk_relay1/conf/sdk_relay1.conf:/home/bitcoin/.conf:ro
|
||||||
- ./modules/sdk_relay1/logs:/home/bitcoin/logs
|
- ./modules/sdk_relay1/logs:/home/bitcoin/logs
|
||||||
@ -129,28 +115,24 @@ services:
|
|||||||
ipv4_address: 172.20.0.14
|
ipv4_address: 172.20.0.14
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- blindbit-oracle.local
|
- sdk_storage
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay2.local:
|
sdk_relay2:
|
||||||
image: git.4nkweb.com/4nk/sdk_relay:dev
|
image: 4nk-node-sdk_relay2:dev
|
||||||
container_name: sdk-relay2.local
|
container_name: 4nk-sdk-relay2
|
||||||
hostname: sdk-relay2.local
|
hostname: sdk-relay2.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8092:8090"
|
- "8092:8090"
|
||||||
- "8093:8091"
|
- "8093:8091"
|
||||||
environment:
|
environment:
|
||||||
- RELAY_RPC_USER=""
|
- RELAY_RPC_USER=bitcoin
|
||||||
- RELAY_RPC_PASSWORD=""
|
- RELAY_RPC_PASSWORD=bitcoin
|
||||||
- COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
- relay_rpc_user=""
|
|
||||||
- relay_rpc_password=""
|
|
||||||
- cookie_path="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/sdk_relay2/conf/sdk_relay2.conf:/home/bitcoin/.conf:ro
|
- ./modules/sdk_relay2/conf/sdk_relay2.conf:/home/bitcoin/.conf:ro
|
||||||
- ./modules/sdk_relay2/logs:/home/bitcoin/logs
|
- ./modules/sdk_relay2/logs:/home/bitcoin/logs
|
||||||
@ -160,28 +142,24 @@ services:
|
|||||||
ipv4_address: 172.20.0.15
|
ipv4_address: 172.20.0.15
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- blindbit-oracle.local
|
- sdk_storage
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_relay3.local:
|
sdk_relay3:
|
||||||
image: git.4nkweb.com/4nk/sdk_relay:dev
|
image: 4nk-node-sdk_relay3:dev
|
||||||
container_name: sdk-relay3.local
|
container_name: 4nk-sdk-relay3
|
||||||
hostname: sdk-relay3.local
|
hostname: sdk-relay3.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8094:8090"
|
- "8094:8090"
|
||||||
- "8095:8091"
|
- "8095:8091"
|
||||||
environment:
|
environment:
|
||||||
- RELAY_RPC_USER=""
|
- RELAY_RPC_USER=bitcoin
|
||||||
- RELAY_RPC_PASSWORD=""
|
- RELAY_RPC_PASSWORD=bitcoin
|
||||||
- COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
- relay_rpc_user=""
|
|
||||||
- relay_rpc_password=""
|
|
||||||
- cookie_path="/home/bitcoin/.bitcoin/signet/.cookie"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./modules/sdk_relay3/conf/sdk_relay3.conf:/home/bitcoin/.conf:ro
|
- ./modules/sdk_relay3/conf/sdk_relay3.conf:/home/bitcoin/.conf:ro
|
||||||
- ./modules/sdk_relay3/logs:/home/bitcoin/logs
|
- ./modules/sdk_relay3/logs:/home/bitcoin/logs
|
||||||
@ -191,18 +169,18 @@ services:
|
|||||||
ipv4_address: 172.20.0.16
|
ipv4_address: 172.20.0.16
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- blindbit-oracle.local
|
- sdk_storage
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8091"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
sdk_signer.local:
|
sdk_signer:
|
||||||
image: git.4nkweb.com/4nk/sdk_signer:dev
|
image: 4nk-node-sdk_signer:dev
|
||||||
container_name: sdk-signer.local
|
container_name: 4nk-sdk-signer
|
||||||
hostname: sdk-signer.local
|
hostname: sdk-signer.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
volumes:
|
volumes:
|
||||||
@ -214,21 +192,20 @@ 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.local
|
- sdk_relay1
|
||||||
- sdk_relay1.local
|
- sdk_relay2
|
||||||
- sdk_relay2.local
|
- sdk_relay3
|
||||||
- sdk_relay3.local
|
|
||||||
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.local:
|
ihm_client:
|
||||||
image: git.4nkweb.com/4nk/ihm_client:dev
|
image: 4nk-node-ihm_client:dev
|
||||||
container_name: ihm-client.local
|
container_name: 4nk-ihm-client
|
||||||
hostname: ihm-client.local
|
hostname: ihm-client.4nk.local
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
- "3003:3003"
|
- "3003:3003"
|
||||||
@ -239,44 +216,84 @@ services:
|
|||||||
ipv4_address: 172.20.0.18
|
ipv4_address: 172.20.0.18
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- sdk_storage.local
|
- sdk_signer
|
||||||
- sdk_relay1.local
|
|
||||||
- sdk_relay2.local
|
|
||||||
- sdk_relay3.local
|
|
||||||
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:
|
||||||
|
image: postgres:15
|
||||||
|
container_name: miniback-postgres
|
||||||
|
hostname: miniback-postgres.4nk.local
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=miniback
|
||||||
|
- POSTGRES_PASSWORD=minibackpassword
|
||||||
|
- POSTGRES_DB=miniback
|
||||||
|
volumes:
|
||||||
|
- miniback_pg_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
4nk_network:
|
||||||
|
ipv4_address: 172.20.0.30
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "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.local:
|
coffre_front:
|
||||||
image: git.4nkweb.com/4nk/lecoffre-front:dev
|
image: lecoffre-front:dev
|
||||||
container_name: coffre-front.local
|
container_name: coffre-front
|
||||||
hostname: coffre-front.local
|
hostname: coffre-front.4nk.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.local
|
|
||||||
- ihm_client.local
|
|
||||||
- sdk_signer.local
|
|
||||||
|
|
||||||
coffre-back-mini.local:
|
coffre_back_mini:
|
||||||
image: git.4nkweb.com/4nk/lecoffre-back-mini:dev
|
image: lecoffre-back-mini:dev
|
||||||
container_name: coffre-back-mini.local
|
container_name: coffre-back-mini
|
||||||
hostname: coffre-back-mini.local
|
hostname: coffre-back-mini.4nk.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
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
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:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
4nk_network:
|
4nk_network:
|
||||||
|
@ -1,68 +1,20 @@
|
|||||||
## Architecture
|
## ARCHITECTURE
|
||||||
|
|
||||||
### Contexte
|
## Contexte
|
||||||
|
|
||||||
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é.
|
## Composants
|
||||||
|
|
||||||
### Composants
|
## Flux et dépendances
|
||||||
|
|
||||||
- Tor : proxy d’anonymisation utilisé par Bitcoin Core.
|
## Données et modèles
|
||||||
- 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).
|
|
||||||
|
|
||||||
### Réseaux et adresses
|
## Sécurité
|
||||||
|
|
||||||
- Réseau principal : `4nk_network` en 172.20.0.0/16, IP statiques et hostnames Docker en `.4nk.local`.
|
## Observabilité
|
||||||
- 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` (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`.
|
- 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).
|
||||||
|
|
||||||
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.
|
Les hostnames internes sont fixés en `.4nk.local` et une IP statique est réservée par service sur `4nk_network`.
|
||||||
|
|
||||||
### 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.
|
|
||||||
|
@ -1,145 +0,0 @@
|
|||||||
# 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,53 +1,34 @@
|
|||||||
## Configuration des images, réseaux et paramètres
|
## Configuration des images et tags
|
||||||
|
|
||||||
### Politique de tags et registres
|
### Introduction
|
||||||
|
|
||||||
- Référence: les services 4NK tirent les images `:dev` depuis `git.4nkweb.com`.
|
Ce document précise l'état courant de la politique de tags d'images et leur utilisation dans l'orchestrateur de `4NK_node`.
|
||||||
- Images externes stables: `dperson/torproxy:latest`, `ruimarinho/bitcoin-core:latest`.
|
|
||||||
- Blindbit: `git.4nkweb.com/4nk/blindbit-oracle:dev`.
|
### Politique de tags (en cours de création)
|
||||||
- Relais: `git.4nkweb.com/4nk/sdk_relay:dev` (image unique pour 1/2/3).
|
|
||||||
- Signer/Storage/UI/Coffre: images `git.4nkweb.com/4nk/*:dev`.
|
- Les tags de build « dev » sont en cours de création pour les services applicatifs internes.
|
||||||
|
- À 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
|
||||||
|
|
||||||
- `4nk_network` : `172.20.0.0/16` avec IP statiques et hostnames `.4nk.local` par service.
|
- Réseau principal `4nk_network` : `172.20.0.0/16`, IP et hostnames statiques par service.
|
||||||
- `4nk_projects_net` : `172.21.0.0/16` réservé pour des projets additionnels.
|
- Réseau réservé projets `4nk_projects_net` : `172.21.0.0/16` (aucun service attaché pour l'instant).
|
||||||
|
|
||||||
### Montages (configuration, données, logs)
|
### Montages de configuration et journaux
|
||||||
|
|
||||||
- Configuration : montée en lecture seule lorsque possible depuis `modules/*/conf` et `projects/*/*/conf`.
|
- Les fichiers de configuration sont montés depuis `modules/*/conf` et `projects/*/*/conf`.
|
||||||
- Données : volumes persistants locaux (`modules/*/data`, `projects/*/*/data`).
|
- Les journaux applicatifs sont montés depuis `modules/*/logs` et `projects/*/*/logs` pour observabilité.
|
||||||
- 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
|
||||||
|
|
||||||
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`.
|
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`.
|
||||||
|
@ -3,29 +3,16 @@
|
|||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
### Images et tags
|
### Images et tags
|
||||||
- tor: dperson/torproxy:latest
|
- tor: 4nk-node-tor:latest
|
||||||
- bitcoin: ruimarinho/bitcoin-core:latest
|
- bitcoin: 4nk-node-bitcoin: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; conf optionnelle `modules/tor/conf/tor.conf` (copiée depuis `.exemple`)
|
- tor: ports 9050, 9051; volume tor_data; conf conf/tor.conf
|
||||||
- bitcoin: ports 38333, 38332, 29000; volumes `modules/bitcoin/{data,logs}`; conf `modules/bitcoin/conf/bitcoin.conf`; dépend de tor
|
- bitcoin: ports 38333, 18443, 29000; volume bitcoin_data; conf 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: miniback_pg_data
|
- Volumes nommés: tor_data, bitcoin_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).
|
||||||
@ -33,30 +20,21 @@
|
|||||||
- 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
|
||||||
- Les services 4NK tirent les images `:dev` depuis `git.4nkweb.com`.
|
- Construire les images avec le tag dédié docker-support-v2 selon la politique du projet.
|
||||||
- Valider les healthchecks (wget sur ports exposés) avant déploiement.
|
- Valider les builds et la santé (healthchecks) avant déploiement.
|
||||||
- Publier les images sur `git.4nkweb.com` pour toute mise à jour.
|
- Publier les artefacts et images dans le registre interne si applicable.
|
||||||
|
|
||||||
## 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 et modules/*/conf)
|
### Fichiers de configuration (4NK_node/conf)
|
||||||
- `modules/bitcoin/conf/bitcoin.conf`
|
- bitcoin.conf (Bitcoin Core)
|
||||||
- `modules/tor/conf/tor.conf` (copier depuis `tor.conf.exemple` si absent)
|
- tor.conf (Tor)
|
||||||
- `modules/blindbit-oracle/conf/blindbit.toml`
|
- Fichiers spécifiques modules: sdk_relay*.conf, sdk_signer.conf, sdk_storage.conf, ihm_client.conf, nginx.conf
|
||||||
- `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 signet), 38332 (RPC), 29000 (custom)
|
- bitcoin: 38333 (P2P testnet/regtest), 18443 (RPC), 29000 (custom)
|
||||||
- blindbit: 8000
|
|
||||||
- sdk_storage: 8081
|
|
||||||
- sdk_relay: 8090/8091
|
|
||||||
- sdk_signer: 9090
|
|
||||||
- ihm_client: 8080/3003
|
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
# 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,16 +5,12 @@
|
|||||||
- 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`
|
||||||
|
@ -1,309 +0,0 @@
|
|||||||
# 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,8 +22,6 @@
|
|||||||
| 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,33 +1,3 @@
|
|||||||
## 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,8 +3,7 @@
|
|||||||
## Prérequis
|
## Prérequis
|
||||||
|
|
||||||
- Docker et docker compose installés
|
- Docker et docker compose installés
|
||||||
- Nginx installé localement (hors Docker)
|
- Nginx utilisé via le service `nginx` de l'orchestrateur
|
||||||
- Grafana installé localement (hors Docker)
|
|
||||||
|
|
||||||
## Installation locale
|
## Installation locale
|
||||||
|
|
||||||
@ -14,63 +13,28 @@
|
|||||||
|
|
||||||
## Démarrage
|
## Démarrage
|
||||||
|
|
||||||
### Services Docker
|
- Démarrer la stack applicative : `docker compose up -d`
|
||||||
- Tester la configuration : `docker compose config --services`
|
- Démarrer la stack de monitoring (Loki/Promtail/Grafana) si souhaité : `docker compose -f log-monitoring.yml up -d`
|
||||||
- Démarrer les services externes : `docker compose up -d tor bitcoin blindbit miniback-postgres`
|
- Accéder aux services via Nginx :
|
||||||
- Démarrer les services 4NK : `docker compose up -d sdk_storage sdk_relay1 sdk_relay2 sdk_relay3 sdk_signer ihm_client`
|
- IHM: `http://localhost/`
|
||||||
|
- Blindbit: `http://localhost/blindbit/`
|
||||||
### Services locaux
|
- SDK Storage: `http://localhost/sdk_storage/`
|
||||||
- Démarrer Nginx local : `systemctl start nginx`
|
- Relais HTTP: `http://localhost/relay1/`, `/relay2/`, `/relay3/`
|
||||||
- Démarrer Grafana local : `systemctl start grafana-server`
|
- Relais WebSocket: `ws://localhost/relay1/ws/` (idem `relay2`, `relay3`)
|
||||||
|
- Signer WS: `ws://localhost/signer/ws/`; HTTP: `http://localhost/signer/`
|
||||||
### Services IA (optionnel)
|
- Coffre front: `http://localhost/coffre/`
|
||||||
- Cloner le repository IA : `git clone https://git.4nkweb.com/4nk/4NK_IA.git`
|
- Grafana: `http://localhost/grafana/`
|
||||||
- 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,12 +1,13 @@
|
|||||||
apiVersion: 1
|
apiVersion: 1
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
- name: '4NK Node Dashboards'
|
- name: '4NK Dashboards'
|
||||||
orgId: 1
|
orgId: 1
|
||||||
folder: '4NK Node'
|
folder: '4NK'
|
||||||
type: file
|
type: file
|
||||||
disableDeletion: false
|
disableDeletion: false
|
||||||
updateIntervalSeconds: 10
|
editable: true
|
||||||
allowUiUpdates: true
|
updateIntervalSeconds: 30
|
||||||
options:
|
options:
|
||||||
path: /etc/grafana/provisioning/dashboards/dashboards
|
path: /etc/grafana/provisioning/dashboards/dashboards
|
||||||
|
EOF
|
||||||
|
@ -4,13 +4,8 @@ datasources:
|
|||||||
- name: Loki
|
- name: Loki
|
||||||
type: loki
|
type: loki
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://localhost:3100
|
url: http://loki:3100
|
||||||
isDefault: true
|
isDefault: true
|
||||||
editable: true
|
|
||||||
jsonData:
|
jsonData:
|
||||||
maxLines: 1000
|
maxLines: 5000
|
||||||
derivedFields:
|
EOF
|
||||||
- datasourceUid: loki
|
|
||||||
matcherRegex: "container_name=(\\w+)"
|
|
||||||
name: "Container"
|
|
||||||
url: "/d/${__value.raw}"
|
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
# 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:38332
|
|
||||||
rpcport=38332
|
|
||||||
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,40 +1,19 @@
|
|||||||
# Configuration globale
|
listen=1
|
||||||
datadir=/home/bitcoin/.bitcoin
|
daemon=1
|
||||||
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]
|
||||||
listen=1
|
whitelist=download@bitcoin.4nk.local
|
||||||
bind=bitcoin.local:38333
|
txindex=1
|
||||||
rpcbind=bitcoin.local:38332
|
proxy=tor.4nk.local:9050
|
||||||
rpcport=38332
|
listenonion=1
|
||||||
fallbackfee=0.0001
|
|
||||||
blockfilterindex=1
|
|
||||||
datacarriersize=205
|
|
||||||
acceptnonstdtxn=1
|
|
||||||
dustrelayfee=0.00000001
|
|
||||||
minrelaytxfee=0.00000001
|
|
||||||
prune=0
|
|
||||||
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821
|
||||||
walletdir=/home/bitcoin/.bitcoin/wallets
|
addnode=6xi33lwwslsx3yi3f7c56wnqtdx4v73vj2up3prrwebpwbz6qisnqbyd.onion:38333
|
||||||
wallet=mining
|
addnode=d6i546e2sjezhyy2eupyc2wqtbgjnkubcjd4prhqurtlmp7nsp6yxqyd.onion:38333
|
||||||
wallet=watchonly
|
|
||||||
maxtxfee=1
|
fallbackfee=0.0001
|
||||||
addnode=tlv2yqamflv22vfdzy2hha2nwmt6zrwrhjjzz4lx7qyq7lyc6wfhabyd.onion
|
|
||||||
|
zmqpubrawblock=tcp://bitcoin.4nk.local:29000
|
||||||
|
zmqpubrawtx=tcp://bitcoin.4nk.local:29000
|
||||||
|
zmqpubhashblock=tcp://bitcoin.4nk.local:29000
|
||||||
|
|
||||||
|
blockfilterindex=1
|
@ -1,28 +0,0 @@
|
|||||||
# 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
|
|
50
modules/blindbit/conf/blindbit.toml
Normal file
50
modules/blindbit/conf/blindbit.toml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# 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
|
50
modules/blindbit/conf/blindbit.toml.exemple
Normal file
50
modules/blindbit/conf/blindbit.toml.exemple
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# 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,16 +1,16 @@
|
|||||||
|
|
||||||
[PROD]
|
[PROD]
|
||||||
U32_MAX=4294967295
|
U32_MAX=4294967295
|
||||||
BASEURL="http://ihm-client.local"
|
BASEURL="http://ihm-client.4nk.local"
|
||||||
BOOTSTRAPURL=["http://sdk-relay1.local:8090"]
|
BOOTSTRAPURL=["http://sdk-relay1.4nk.local:8090"]
|
||||||
STORAGEURL="http://sdk-storage.local/storage"
|
STORAGEURL="http://sdk-storage.4nk.local/storage"
|
||||||
BLINDBITURL="http://blindbit.local:8000"
|
BLINDBITURL="http://blindbit.4nk.local:8000"
|
||||||
DEFAULTAMOUNT=1000
|
DEFAULTAMOUNT=1000
|
||||||
|
|
||||||
[DEV]
|
[DEV]
|
||||||
U32_MAX=4294967295
|
U32_MAX=4294967295
|
||||||
BASEURL="http://ihm-client.local"
|
BASEURL="http://ihm-client.4nk.local"
|
||||||
BOOTSTRAPURL=["http://sdk-relay1.local:8090"]
|
BOOTSTRAPURL=["http://sdk-relay1.4nk.local:8090"]
|
||||||
STORAGEURL="http://sdk-storage.local/storage"
|
STORAGEURL="http://sdk-storage.4nk.local/storage"
|
||||||
BLINDBITURL="http://blindbit.local:8000"
|
BLINDBITURL="http://blindbit.4nk.local:8000"
|
||||||
DEFAULTAMOUNT=1000
|
DEFAULTAMOUNT=1000
|
7
modules/ihm_client/conf/config.ts
Normal file
7
modules/ihm_client/conf/config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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;
|
7
modules/ihm_client/conf/config.ts.exemple
Normal file
7
modules/ihm_client/conf/config.ts.exemple
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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,9 +1,6 @@
|
|||||||
core_url="http://bitcoin.local:38332"
|
core_url="http://bitcoin.4nk.local:38332"
|
||||||
ws_url="sdk-relay1.local:8090"
|
ws_url="sdk-relay1.4nk.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit-oracle.local:8000"
|
blindbit_url="http://blindbit.4nk.local:8000"
|
||||||
zmq_url="tcp://bitcoin.local:29000"
|
zmq_url="tcp://bitcoin.4nk.local:29000"
|
||||||
storage="https://sdk-storage.local/storage"
|
|
||||||
data_dir="/home/bitcoin/.4nk"
|
|
||||||
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
|
@ -1,9 +1,6 @@
|
|||||||
core_url="http://bitcoin.local:38332"
|
core_url="http://bitcoin.4nk.local:38332"
|
||||||
ws_url="sdk-relay2.local:8090"
|
ws_url="sdk-relay2.4nk.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit-oracle.local:8000"
|
blindbit_url="http://blindbit.4nk.local:8000"
|
||||||
zmq_url="tcp://bitcoin.local:29000"
|
zmq_url="tcp://bitcoin.4nk.local:29000"
|
||||||
storage="https://sdk-storage.local/storage"
|
|
||||||
data_dir="/home/bitcoin/.4nk"
|
|
||||||
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
|
@ -1,9 +1,6 @@
|
|||||||
core_url="http://bitcoin.local:38332"
|
core_url="http://bitcoin.4nk.local:38332"
|
||||||
ws_url="sdk-relay3.local:8090"
|
ws_url="sdk-relay3.4nk.local:8090"
|
||||||
wallet_name="default"
|
wallet_name="default"
|
||||||
network="signet"
|
network="signet"
|
||||||
blindbit_url="http://blindbit-oracle.local:8000"
|
blindbit_url="http://blindbit.4nk.local:8000"
|
||||||
zmq_url="tcp://bitcoin.local:29000"
|
zmq_url="tcp://bitcoin.4nk.local:29000"
|
||||||
storage="https://sdk-storage.local/storage"
|
|
||||||
data_dir="/home/bitcoin/.4nk"
|
|
||||||
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
|
@ -5,16 +5,14 @@ ws_port = 9090
|
|||||||
http_port = 9092
|
http_port = 9092
|
||||||
|
|
||||||
# URLs des services
|
# URLs des services
|
||||||
relay_urls = ["http://sdk-relay1.local:8091", "http://sdk-relay2.local:8093", "http://sdk-relay3.local:8095"]
|
relay_urls = ["http://4nk-sdk-relay1:8091", "http://4nk-sdk-relay2:8093", "http://4nk-sdk-relay3:8095"]
|
||||||
storage_url = "http://sdk-storage.local:8081"
|
storage_url = "http://4nk-sdk-storage:8081"
|
||||||
blindbit_url = "http://blindbit-core.local:8000"
|
blindbit_url = "http://4nk-blindbit:8000"
|
||||||
bitcoin_rpc_url = "http://bitcoin.local:38332"
|
bitcoin_rpc_url = "http://4nk-bitcoin:38332"
|
||||||
|
|
||||||
# Authentification Bitcoin
|
# Authentification Bitcoin
|
||||||
bitcoin_rpc_user = "bitcoin"
|
bitcoin_rpc_user = "bitcoin"
|
||||||
bitcoin_rpc_password = "bitcoin"
|
bitcoin_rpc_password = "bitcoin"
|
||||||
data_dir="/home/bitcoin/.4nk"
|
|
||||||
bitcoin_data_dir="/home/bitcoin/.bitcoin"
|
|
||||||
|
|
||||||
# Mode développement
|
# Mode développement
|
||||||
dev_mode = true
|
dev_mode = true
|
||||||
@ -26,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
|
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
MANIFEST-000791
|
|
@ -1,3 +0,0 @@
|
|||||||
2025/09/11-07:35:29.765658 7f32ae08cb38 Recovering log #790
|
|
||||||
2025/09/11-07:35:29.783093 7f32ae08cb38 Delete type=3 #789
|
|
||||||
2025/09/11-07:35:29.783159 7f32ae08cb38 Delete type=0 #790
|
|
@ -1,3 +0,0 @@
|
|||||||
2025/09/11-07:34:58.695441 7eff68c3fb38 Recovering log #788
|
|
||||||
2025/09/11-07:34:58.713050 7eff68c3fb38 Delete type=0 #788
|
|
||||||
2025/09/11-07:34:58.713099 7eff68c3fb38 Delete type=3 #787
|
|
Binary file not shown.
33
modules/sdk_storage/conf/sdk_storage.conf.exemple
Normal file
33
modules/sdk_storage/conf/sdk_storage.conf.exemple
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Configuration sdk_storage - Module 4NK_node
|
||||||
|
|
||||||
|
# Port d'écoute
|
||||||
|
http_port = 8081
|
||||||
|
|
||||||
|
# Base de données
|
||||||
|
db_path = "$HOME/bitcoin/.4nk/storage.db"
|
||||||
|
|
||||||
|
# URLs des services
|
||||||
|
relay_urls = ["http://4nk-sdk-relay1:8091", "http://4nk-sdk-relay2:8093", "http://4nk-sdk-relay3:8095"]
|
||||||
|
bitcoin_rpc_url = "http://4nk-bitcoin:38332"
|
||||||
|
bitcoin_rpc_user = "bitcoin"
|
||||||
|
bitcoin_rpc_password = "bitcoin"
|
||||||
|
|
||||||
|
# Mode développement
|
||||||
|
dev_mode = true
|
||||||
|
debug_level = "info"
|
||||||
|
|
||||||
|
# Limites de connexions
|
||||||
|
max_connections = 100
|
||||||
|
timeout = 30
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
log_level = "info"
|
||||||
|
log_file = "$HOME/bitcoin/logs/sdk_storage.log"
|
||||||
|
|
||||||
|
# Stockage de fichiers
|
||||||
|
file_storage_path = "$HOME/bitcoin/.4nk/files"
|
||||||
|
max_file_size = "100MB"
|
||||||
|
|
||||||
|
# Sécurité
|
||||||
|
enable_tls = false
|
||||||
|
enable_auth = false
|
@ -3,8 +3,8 @@
|
|||||||
# Ports d\écoute
|
# Ports d\écoute
|
||||||
|
|
||||||
# Ports d\'écoute
|
# Ports d\'écoute
|
||||||
SocksPort tor.local:9050
|
SocksPort tor.4nk.local:9050
|
||||||
ControlPort tor.local:9051
|
ControlPort tor.4nk.local:9051
|
||||||
|
|
||||||
# Répertoires
|
# Répertoires
|
||||||
DataDirectory /var/lib/tor
|
DataDirectory /var/lib/tor
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
# Configuration OVH
|
# Configuration OVH
|
||||||
OVH_APP_KEY=
|
OVH_APP_KEY=5ab0709bbb65ef26
|
||||||
OVH_APP_SECRET=
|
OVH_APP_SECRET=de1fac1779d707d263a611a557cd5766
|
||||||
OVH_CONSUMER_KEY=
|
OVH_CONSUMER_KEY=5fe817829b8a9c780cfa2354f8312ece
|
||||||
OVH_SMS_SERVICE_NAME=sms-tt802880-1
|
OVH_SMS_SERVICE_NAME=sms-tt802880-1
|
||||||
|
|
||||||
# Configuration SMS Factor
|
# Configuration SMS Factor
|
||||||
SMS_FACTOR_TOKEN=
|
SMS_FACTOR_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4NzgzNiIsImlhdCI6MTcwMTMzOTY1Mi45NDUzOH0.GNoqLb5MDBWuniNlQjbr1PKolwxGqBZe_tf4IMObvHw
|
||||||
|
|
||||||
#Configuration Mailchimp
|
#Configuration Mailchimp
|
||||||
MAILCHIMP_API_KEY=
|
MAILCHIMP_API_KEY=md-VVfaml-ApIV4nsGgaJKl0A
|
||||||
MAILCHIMP_KEY=
|
MAILCHIMP_KEY=3fa54304bc766dfd0b8043a827b28a3a-us17
|
||||||
MAILCHIMP_LIST_ID=
|
MAILCHIMP_LIST_ID=a48d9ad852
|
||||||
|
|
||||||
#Configuration Stripe
|
#Configuration Stripe
|
||||||
STRIPE_SECRET_KEY=
|
STRIPE_SECRET_KEY=sk_test_51OwKmMP5xh1u9BqSeFpqw0Yr15hHtFsh0pvRGaE0VERhlYtvw33ND1qiGA6Dy1DPmmV61B6BqIimlhuv7bwElhjF00PLQwD60n
|
||||||
STRIPE_WEBHOOK_SECRET=
|
STRIPE_WEBHOOK_SECRET=
|
||||||
STRIPE_STANDARD_SUBSCRIPTION_PRICE_ID=
|
STRIPE_STANDARD_SUBSCRIPTION_PRICE_ID=price_1P66fuP5xh1u9BqSHj0O6Uy3
|
||||||
STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NsRP5xh1u9BqSFgkUDbQY
|
||||||
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=
|
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=price_1P66RqP5xh1u9BqSuUzkQNac
|
||||||
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NpKP5xh1u9BqSApFogvUB
|
||||||
|
|
||||||
# Configuration serveur
|
# Configuration serveur
|
||||||
APP_HOST=http://coffre-back-mini.local
|
APP_HOST=http://miniback.4nk.local
|
||||||
PORT=8080
|
PORT=8080
|
||||||
|
|
||||||
# Configuration front-end
|
# Configuration front-end
|
||||||
NEXT_PUBLIC_4NK_URL=http://ihm-client.local
|
NEXT_PUBLIC_4NK_URL=https://ihm-client.4nk.local
|
||||||
NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.local:3000
|
NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.4nk.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=
|
NEXT_PUBLIC_IDNOT_CLIENT_ID=4501646203F3EF67
|
||||||
NEXT_PUBLIC_BACK_API_PROTOCOL=http
|
NEXT_PUBLIC_BACK_API_PROTOCOL=http
|
||||||
NEXT_PUBLIC_BACK_API_HOST=localhost
|
NEXT_PUBLIC_BACK_API_HOST=miniback.4nk.local
|
||||||
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=''
|
IDNOT_API_KEY='ba557f84-0bf6-4dbf-844f-df2767555e3e'
|
||||||
|
|
||||||
# Configuration PostgreSQL
|
# Configuration PostgreSQL
|
||||||
DB_HOST=miniback-postgres.local
|
DB_HOST=
|
||||||
DB_PORT=5432
|
DB_PORT=
|
||||||
DB_NAME=miniback
|
DB_NAME=
|
||||||
DB_USER=miniback
|
DB_USER=
|
||||||
DB_PASSWORD=minibackpassword
|
DB_PASSWORD=
|
||||||
|
|
||||||
LOG_LEVEL="debug"
|
LOG_LEVEL="debug"
|
@ -1,10 +1,10 @@
|
|||||||
NEXT_PUBLIC_4NK_URL="http://ihm-client.local:3003"
|
EXT_PUBLIC_4NK_URL="http://ihm-client.4nk.local:3003"
|
||||||
NEXT_PUBLIC_FRONT_APP_HOST="http://coffre-front.local:3000"
|
NEXT_PUBLIC_FRONT_APP_HOST="http://coffre-front.4nk.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=""
|
NEXT_PUBLIC_IDNOT_CLIENT_ID="4501646203F3EF67"
|
||||||
NEXT_PUBLIC_BACK_API_PROTOCOL=http://
|
NEXT_PUBLIC_BACK_API_PROTOCOL=http://
|
||||||
NEXT_PUBLIC_BACK_API_HOST=localhost
|
NEXT_PUBLIC_BACK_API_HOST=miniback.4nk.local
|
||||||
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
|
@ -1,60 +0,0 @@
|
|||||||
#!/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"
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/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=(
|
|
||||||
[bitcoin.local]=38332
|
|
||||||
[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