From 35a209ce8b9109830b4b24e89285f25c0320b9af Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Wed, 1 Oct 2025 12:04:16 +0000 Subject: [PATCH] chore(confs): update all paths to /home/debian/4NK_env/lecoffre_node/{confs,logs,data} and fix bitcoin datadir --- confs/README.md | 95 ++++++++++++++++++++++++++++ confs/bitcoin/.gitkeep | 1 + confs/blindbit-oracle/.gitkeep | 1 + confs/git/.gitkeep | 1 + confs/grafana/.gitkeep | 0 confs/ihm_client/.gitkeep | 1 + confs/lecoffre-back-mini/.gitkeep | 1 + confs/lecoffre-front/.gitkeep | 1 + confs/lecoffre_node/.gitkeep | 1 + confs/logrotade/.gitkeep | 1 + confs/loki/.gitkeep | 1 + confs/monitoring/.gitkeep | 0 confs/nginx/.gitkeep | 1 + confs/nginx/4NK_vault.code-workspace | 11 ++++ confs/promtail/.gitkeep | 1 + confs/promtail/.gitkeep copy | 0 confs/sdk_relay/.gitkeep | 1 + confs/sdk_storage/.gitkeep | 1 + confs/signer/.gitkeep | 1 + confs/status/.gitkeep | 1 + confs/supervisor/.gitkeep | 1 + confs/tor/.gitkeep | 1 + confs/tor/torrc | 21 ++++++ 23 files changed, 144 insertions(+) create mode 100644 confs/README.md create mode 100644 confs/bitcoin/.gitkeep create mode 100644 confs/blindbit-oracle/.gitkeep create mode 100644 confs/git/.gitkeep create mode 100644 confs/grafana/.gitkeep create mode 100644 confs/ihm_client/.gitkeep create mode 100644 confs/lecoffre-back-mini/.gitkeep create mode 100644 confs/lecoffre-front/.gitkeep create mode 100644 confs/lecoffre_node/.gitkeep create mode 100644 confs/logrotade/.gitkeep create mode 100644 confs/loki/.gitkeep create mode 100644 confs/monitoring/.gitkeep create mode 100644 confs/nginx/.gitkeep create mode 100644 confs/nginx/4NK_vault.code-workspace create mode 100644 confs/promtail/.gitkeep create mode 100644 confs/promtail/.gitkeep copy create mode 100644 confs/sdk_relay/.gitkeep create mode 100644 confs/sdk_storage/.gitkeep create mode 100644 confs/signer/.gitkeep create mode 100644 confs/status/.gitkeep create mode 100644 confs/supervisor/.gitkeep create mode 100644 confs/tor/.gitkeep create mode 100644 confs/tor/torrc diff --git a/confs/README.md b/confs/README.md new file mode 100644 index 0000000..fc17ee1 --- /dev/null +++ b/confs/README.md @@ -0,0 +1,95 @@ +# Configuration Centralisée - LeCoffre Node + +Ce dossier contient toutes les configurations centralisées pour les services du projet LeCoffre Node. + +## Structure + +``` +conf/ +├── bitcoin/ # Configuration Bitcoin Signet +│ └── bitcoin.conf +├── relay/ # Configuration SDK Relay +│ └── sdk_relay.conf +├── nginx/ # Configurations Nginx (déjà existantes) +│ └── ... +├── ihm_client/ # Configuration IHM Client +│ └── nginx.dev.conf +├── lecoffre-front/ # Configuration LeCoffre Frontend +└── miner/ # Configuration du mineur +``` + +## Scripts de Gestion + +Les configurations et le déploiement sont gérés via des scripts centralisés : + +- `scripts/sync-configs.sh` : Synchronise toutes les configurations +- `scripts/startup-sequence.sh` : Script principal avec déploiement complet +- `scripts/pre-build.sh` : Prépare l'environnement avant build Docker + +## Avantages + +1. **Centralisation** : Toutes les configurations au même endroit +2. **Cohérence** : Gestion uniforme des paramètres +3. **Maintenance** : Modifications centralisées +4. **Versioning** : Suivi des changements de configuration +5. **Backup** : Sauvegarde centralisée + +## Utilisation + +### Synchronisation manuelle +```bash +# Synchroniser tous les projets +./scripts/sync-configs.sh + +# Synchroniser un projet spécifique +./scripts/sync-configs.sh ihm_client +``` + +### Déploiement complet +```bash +# Déployer tous les projets +./scripts/startup-sequence.sh deploy + +# Déployer un projet spécifique +./scripts/startup-sequence.sh deploy-project ihm_client + +# Déployer avec push des images Docker +PUSH_DOCKER_IMAGES=true ./scripts/startup-sequence.sh deploy +``` + +### Préparation avant build +```bash +# Préparer l'environnement avant build Docker +./scripts/pre-build.sh +``` + +### Commandes de maintenance +```bash +# Mettre à jour toutes les dépendances +./scripts/startup-sequence.sh update-deps + +# Vérifier les fichiers ignore +./scripts/startup-sequence.sh check-ignore + +# Nettoyer les fichiers non suivis +./scripts/startup-sequence.sh clean-untracked + +# Compiler tous les projets +./scripts/startup-sequence.sh compile-all + +# Exécuter tous les tests +./scripts/startup-sequence.sh test-all +``` + +### Modification d'une configuration +1. Éditer le fichier dans `conf/[service]/` +2. Synchroniser avec `./scripts/sync-configs.sh [service]` +3. Redémarrer le service concerné + +## Services Concernés + +- **Bitcoin Signet** : Configuration du nœud Bitcoin +- **SDK Relay** : Configuration du relais WebSocket +- **IHM Client** : Configuration Nginx pour l'interface client +- **LeCoffre Front/Back** : Configurations des services web +- **Mineur** : Configuration du minage Bitcoin diff --git a/confs/bitcoin/.gitkeep b/confs/bitcoin/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/bitcoin/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/blindbit-oracle/.gitkeep b/confs/blindbit-oracle/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/blindbit-oracle/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/git/.gitkeep b/confs/git/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/git/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/grafana/.gitkeep b/confs/grafana/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/confs/ihm_client/.gitkeep b/confs/ihm_client/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/ihm_client/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/lecoffre-back-mini/.gitkeep b/confs/lecoffre-back-mini/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/lecoffre-back-mini/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/lecoffre-front/.gitkeep b/confs/lecoffre-front/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/lecoffre-front/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/lecoffre_node/.gitkeep b/confs/lecoffre_node/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/lecoffre_node/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/logrotade/.gitkeep b/confs/logrotade/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/logrotade/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/loki/.gitkeep b/confs/loki/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/loki/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/monitoring/.gitkeep b/confs/monitoring/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/confs/nginx/.gitkeep b/confs/nginx/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/nginx/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/nginx/4NK_vault.code-workspace b/confs/nginx/4NK_vault.code-workspace new file mode 100644 index 0000000..f7d202f --- /dev/null +++ b/confs/nginx/4NK_vault.code-workspace @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": "../../.." + }, + { + "path": "../../../../../../etc/nginx" + } + ], + "settings": {} +} \ No newline at end of file diff --git a/confs/promtail/.gitkeep b/confs/promtail/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/promtail/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/promtail/.gitkeep copy b/confs/promtail/.gitkeep copy new file mode 100644 index 0000000..e69de29 diff --git a/confs/sdk_relay/.gitkeep b/confs/sdk_relay/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/sdk_relay/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/sdk_storage/.gitkeep b/confs/sdk_storage/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/sdk_storage/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/signer/.gitkeep b/confs/signer/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/signer/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/status/.gitkeep b/confs/status/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/status/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/supervisor/.gitkeep b/confs/supervisor/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/supervisor/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/tor/.gitkeep b/confs/tor/.gitkeep new file mode 100644 index 0000000..6a04314 --- /dev/null +++ b/confs/tor/.gitkeep @@ -0,0 +1 @@ +./ \ No newline at end of file diff --git a/confs/tor/torrc b/confs/tor/torrc new file mode 100644 index 0000000..70d14e6 --- /dev/null +++ b/confs/tor/torrc @@ -0,0 +1,21 @@ +# Configuration Tor pour LeCoffre Node +# Écoute sur 127.0.0.1 pour la sécurité + +# Port SOCKS pour les connexions sortantes +SOCKSPort 127.0.0.1:9050 + +# Port de contrôle (désactivé pour la sécurité) +# ControlPort 127.0.0.1:9050 + +# Configuration de base +Log notice file /home/debian/4NK_env/lecoffre_node/logs/tor/tor.log +DataDirectory /home/debian/4NK_env/lecoffre_node/data/tor + +# Configuration réseau +ClientOnly 1 +SafeLogging 1 +WarnUnsafeSocks 1 + +# Désactiver les services cachés +HiddenServiceDir /home/debian/4NK_env/lecoffre_node/data/tor/hidden_service/ +HiddenServicePort 80 127.0.0.1:80