align for IA agents + grafana

This commit is contained in:
Nicolas Cantu 2025-09-22 15:45:15 +00:00
parent 548ce26009
commit 32f1c7946c
23 changed files with 82 additions and 759 deletions

View File

@ -104,13 +104,13 @@ SDK_RELAY_CORE_URL=http://bitcoin:38332
SDK_RELAY_WS_URL=0.0.0.0:8090
SDK_RELAY_WALLET_NAME=default
SDK_RELAY_NETWORK=signet
SDK_RELAY_BLINDBIT_URL=http://blindbit:8000
SDK_RELAY_ZMQ_URL=tcp://bitcoin:29000
SDK_RELAY_STORAGE=https://${DOMAIN}/storage
SDK_RELAY_DATA_DIR=/app/.4nk
SDK_RELAY_BITCOIN_DATA_DIR=/app/.bitcoin
SDK_RELAY_BOOTSTRAP_URL=wss://${BOOTSTRAP_DOMAIN}/ws/
SDK_RELAY_BOOTSTRAP_FAUCET=true
SDK_RELAY_BLINDBIT_URL=http://blindbit-oracle:8000
# ===========================================
# VARIABLES IHM_CLIENT (formatées pour docker-compose)

View File

@ -105,13 +105,13 @@ SDK_RELAY_CORE_URL=http://bitcoin:38332
SDK_RELAY_WS_URL=0.0.0.0:8090
SDK_RELAY_WALLET_NAME=default
SDK_RELAY_NETWORK=signet
SDK_RELAY_BLINDBIT_URL=http://blindbit:8000
SDK_RELAY_ZMQ_URL=tcp://bitcoin:29000
SDK_RELAY_STORAGE=https://${DOMAIN}/storage
SDK_RELAY_DATA_DIR=/app/.4nk
SDK_RELAY_BITCOIN_DATA_DIR=/app/.bitcoin
SDK_RELAY_BOOTSTRAP_URL=wss://${BOOTSTRAP_DOMAIN}/ws/
SDK_RELAY_BOOTSTRAP_FAUCET=true
SDK_RELAY_BLINDBIT_URL=http://blindbit-oracle:8000
# ===========================================
# VARIABLES IHM_CLIENT (formatées pour docker-compose)

View File

@ -11,6 +11,6 @@
## [1.0.0]
### Version initiale
- Configuration Docker Compose complète
- Services : tor, bitcoin, blindbit, sdk_storage, sdk_relay, sdk_signer, ihm_client, lecoffre-front, lecoffre-back
- Services : tor, bitcoin, blindbit, sdk_storage, sdk_relay, sdk_signer, ihm_client, lecoffre-front
- Configuration Nginx pour dev4.4nkweb.com
- Scripts de démarrage et validation

View File

@ -58,7 +58,6 @@ Internet → dev4.4nkweb.com (Nginx) → Services Locaux
| Service | Port | Statut | Description |
|---------|------|--------|-------------|
| `lecoffre-front` | 3004 | ✅ | Interface utilisateur |
| `lecoffre-back` | 8080 | ✅ | API Backend |
| `ihm_client` | 3003 | ✅ | Gestion des clés |
| `sdk_relay` | 8090-8091 | ✅ | Relay WebSocket |
| `sdk_signer` | 3001 | ✅ | Service de signature |
@ -212,7 +211,6 @@ lecoffre_node/
| `sdk_storage` | `ext` | Stockage temporaire |
| `ihm_client` | `ext` | Interface de gestion |
| `lecoffre-front` | `ext` | Frontend LeCoffre |
| `lecoffre-back-mini` | `ext` | Backend API |
## 📚 Documentation Complète

View File

@ -15,7 +15,6 @@ conf/
├── ihm_client/ # Configuration IHM Client
│ └── nginx.dev.conf
├── lecoffre-front/ # Configuration LeCoffre Frontend
├── lecoffre-back/ # Configuration LeCoffre Backend
└── miner/ # Configuration du mineur
```

View File

@ -1,591 +0,0 @@
{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "sum(rate({container=\"lecoffre-back\"} | json | statusCode != \"\" [5m])) by (statusCode)",
"queryType": "",
"refId": "A"
}
],
"title": "Requêtes HTTP par Status Code",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "sum(rate({container=\"lecoffre-back\"} | json | url != \"\" [5m])) by (url)",
"queryType": "",
"refId": "A"
}
],
"title": "Endpoints les Plus Utilisés",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "count_over_time({container=\"lecoffre-back\"} |= \"ERROR\" [1h])",
"queryType": "",
"refId": "A"
}
],
"title": "Erreurs (1h)",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 8
},
"id": 4,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "avg({container=\"lecoffre-back\"} | json | duration != \"\" | unwrap duration [5m])",
"queryType": "",
"refId": "A"
}
],
"title": "Temps de Réponse Moyen (ms)",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 8
},
"id": 5,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "sum(rate({container=\"lecoffre-back\"} | json | method != \"\" [5m]))",
"queryType": "",
"refId": "A"
}
],
"title": "Requêtes/seconde",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 8
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "count_over_time({container=\"lecoffre-back\"} | json | statusCode = \"200\" [1h])",
"queryType": "",
"refId": "A"
}
],
"title": "Succès (1h)",
"type": "stat"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
}
},
"mappings": []
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 12
},
"id": 7,
"options": {
"legend": {
"displayMode": "list",
"placement": "right"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "sum by (method) (count_over_time({container=\"lecoffre-back\"} | json | method != \"\" [1h]))",
"queryType": "",
"refId": "A"
}
],
"title": "Distribution des Méthodes HTTP",
"type": "piechart"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 12
},
"id": 8,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "{container=\"lecoffre-back\"} |= \"ERROR\" | json | line_format \"{{.timestamp}} - {{.method}} {{.url}} - {{.error}}\"",
"queryType": "",
"refId": "A"
}
],
"title": "Erreurs Récentes",
"type": "table"
}
],
"refresh": "5s",
"schemaVersion": 37,
"style": "dark",
"tags": [
"lecoffre",
"backend",
"api"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "LeCoffre Backend - Monitoring",
"uid": "lecoffre-backend",
"version": 1,
"weekStart": ""
}

View File

@ -235,7 +235,7 @@
"uid": "loki"
},
"editorMode": "code",
"expr": "{job=~\"bitcoin|blindbit|sdk_relay|sdk_signer|sdk_storage|lecoffre-back|lecoffre-front|ihm_client|miner\"} |= \"error\" | logfmt",
"expr": "{job=~\"bitcoin|blindbit|sdk_relay|sdk_signer|sdk_storage|lecoffre-front|ihm_client|miner\"} |= \"error\" | logfmt",
"queryType": "",
"refId": "A"
}

View File

@ -102,18 +102,6 @@
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"editorMode": "code",
"expr": "sum by (service) (count_over_time({job=\"lecoffre-back\"} [5m]))",
"queryType": "",
"refId": "A"
}
],
"title": "LeCoffre Backend - Volume Logs",
"type": "timeseries"
},
@ -413,7 +401,7 @@
"uid": "loki"
},
"editorMode": "code",
"expr": "{job=~\"lecoffre-back|lecoffre-front|ihm_client|sdk_relay|sdk_signer|sdk_storage\"} |= \"error\" | logfmt",
"expr": "{job=~\"lecoffre-front|ihm_client|sdk_relay|sdk_signer|sdk_storage\"} |= \"error\" | logfmt",
"queryType": "",
"refId": "A"
}

View File

@ -1,13 +1,3 @@
logs/lecoffre-back/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 644 root root
postrotate
# Redémarrer le service si nécessaire
docker restart lecoffre-back 2>/dev/null || true
endscript
}

View File

@ -21,7 +21,7 @@ log_compression=true
[services]
# Services surveillés
services=bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storage,lecoffre-back,lecoffre-front,ihm_client,tor,miner
services=bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storagelecoffre-front,ihm_client,tor,miner
[alerts]
# Configuration des alertes

View File

@ -59,16 +59,6 @@ scrape_configs:
service: sdk_storage
__path__: /var/log/lecoffre/sdk_storage/*.log
# LeCoffre Backend Logs
- job_name: lecoffre-back
static_configs:
- targets:
- localhost
labels:
job: lecoffre-back
service: lecoffre-back
__path__: /var/log/lecoffre/lecoffre-back/*.log
# LeCoffre Frontend Logs
- job_name: lecoffre-front
static_configs:

View File

@ -80,6 +80,8 @@ services:
sdk_relay:
image: git.4nkweb.com/4nk/sdk_relay:ext
container_name: sdk_relay
env_file:
- .env.master
depends_on:
blindbit:
condition: service_healthy
@ -123,57 +125,61 @@ services:
retries: 50
restart: unless-stopped
lecoffre-back:
image: git.4nkweb.com/4nk/lecoffre-back-mini:ext
container_name: lecoffre-back
environment:
- NODE_OPTIONS=${NODE_OPTIONS}
- NODE_ENV=${NODE_ENV}
- IDNOT_ANNUARY_BASE_URL=${IDNOT_ANNUARY_BASE_URL}
- IDNOT_REDIRECT_URI=${IDNOT_REDIRECT_URI}
- IDNOT_TOKEN_URL=${IDNOT_TOKEN_URL}
- IDNOT_API_BASE_URL=${IDNOT_API_BASE_URL}
- APP_HOST=${APP_HOST}
- API_BASE_URL=${API_BASE_URL}
- DEFAULT_STORAGE=${DEFAULT_STORAGE}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
- MAILCHIMP_API_KEY=${MAILCHIMP_API_KEY}
- MAILCHIMP_SERVER_PREFIX=${MAILCHIMP_SERVER_PREFIX}
- MAILCHIMP_LIST_ID=${MAILCHIMP_LIST_ID}
- OVH_APPLICATION_KEY=${OVH_APPLICATION_KEY}
- OVH_APPLICATION_SECRET=${OVH_APPLICATION_SECRET}
- OVH_CONSUMER_KEY=${OVH_CONSUMER_KEY}
- OVH_SERVICE_NAME=${OVH_SERVICE_NAME}
ports:
- "0.0.0.0:8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./logs/lecoffre-back:/var/log/lecoffre-back
networks:
btcnet:
aliases:
- lecoffre-back
depends_on:
sdk_relay:
condition: service_healthy
user: appuser
command: ["node", "dist/server.js"]
healthcheck:
test: ["CMD", "sh", "-c", "if curl -f http://localhost:8080/api/v1/health >/dev/null 2>&1; then echo 'LeCoffre Backend ready: API responding'; exit 0; else echo 'LeCoffre Backend starting: API not yet ready'; exit 1; fi"]
interval: 30s
timeout: 10s
retries: 50
start_period: 60s
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
# lecoffre-back:
# image: git.4nkweb.com/4nk/lecoffre-back-mini:ext
# container_name: lecoffre-back
# env_file:
# - .env.master
# environment:
# - NODE_OPTIONS=${NODE_OPTIONS}
# - NODE_ENV=${NODE_ENV}
# - IDNOT_ANNUARY_BASE_URL=${IDNOT_ANNUARY_BASE_URL}
# - IDNOT_REDIRECT_URI=${IDNOT_REDIRECT_URI}
# - IDNOT_TOKEN_URL=${IDNOT_TOKEN_URL}
# - IDNOT_API_BASE_URL=${IDNOT_API_BASE_URL}
# - APP_HOST=${APP_HOST}
# - API_BASE_URL=${API_BASE_URL}
# - DEFAULT_STORAGE=${DEFAULT_STORAGE}
# - STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
# - STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
# - STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
# - MAILCHIMP_API_KEY=${MAILCHIMP_API_KEY}
# - MAILCHIMP_SERVER_PREFIX=${MAILCHIMP_SERVER_PREFIX}
# - MAILCHIMP_LIST_ID=${MAILCHIMP_LIST_ID}
# - OVH_APPLICATION_KEY=${OVH_APPLICATION_KEY}
# - OVH_APPLICATION_SECRET=${OVH_APPLICATION_SECRET}
# - OVH_CONSUMER_KEY=${OVH_CONSUMER_KEY}
# - OVH_SERVICE_NAME=${OVH_SERVICE_NAME}
# ports:
# - "0.0.0.0:8080:8080"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ./logs/lecoffre-back:/var/log/lecoffre-back
# networks:
# btcnet:
# aliases:
# - lecoffre-back
# depends_on:
# sdk_relay:
# condition: service_healthy
# user: appuser
# command: ["node", "dist/server.js"]
# healthcheck:
# test: ["CMD", "sh", "-c", "if curl -f http://localhost:8080/api/v1/health >/dev/null 2>&1; then echo 'LeCoffre Backend ready: API responding'; exit 0; else echo 'LeCoffre Backend starting: API not yet ready'; exit 1; fi"]
# interval: 30s
# timeout: 10s
# retries: 50
# start_period: 60s
# labels:
# - "com.centurylinklabs.watchtower.enable=true"
# restart: unless-stopped
lecoffre-front:
image: git.4nkweb.com/4nk/lecoffre-front:ext
container_name: lecoffre-front
working_dir: /leCoffre-front
env_file:
- .env.master
environment:
- NODE_OPTIONS=${NODE_OPTIONS}
- NODE_ENV=${NODE_ENV}
@ -196,14 +202,14 @@ services:
aliases:
- lecoffre-front
depends_on:
lecoffre-back:
condition: service_healthy
ihm_client:
condition: service_healthy
sdk_storage:
condition: service_healthy
sdk_signer:
condition: service_healthy
# lecoffre-back:
# condition: service_healthy
ihm_client:
condition: service_healthy
sdk_storage:
condition: service_healthy
sdk_signer:
condition: service_healthy
user: lecoffreuser
command: ["node", "server.js"]
healthcheck:
@ -219,6 +225,8 @@ services:
ihm_client:
image: git.4nkweb.com/4nk/ihm_client:ext
container_name: ihm_client
env_file:
- .env.master
environment:
- VITE_JWT_SECRET_KEY=${VITE_JWT_SECRET_KEY}
- VITE_API_BASE_URL=${VITE_API_BASE_URL}
@ -256,6 +264,8 @@ services:
sdk_signer:
image: git.4nkweb.com/4nk/sdk_signer:ext
container_name: sdk_signer
env_file:
- .env.master
ports:
- "0.0.0.0:3001:9090"
volumes:

View File

@ -113,52 +113,7 @@ services:
retries: 50
restart: unless-stopped
lecoffre-back:
image: git.4nkweb.com/4nk/lecoffre-back-mini:ext
container_name: lecoffre-back
environment:
- NODE_OPTIONS=${NODE_OPTIONS}
- NODE_ENV=${NODE_ENV}
- IDNOT_ANNUARY_BASE_URL=${IDNOT_ANNUARY_BASE_URL}
- IDNOT_REDIRECT_URI=${IDNOT_REDIRECT_URI}
- IDNOT_TOKEN_URL=${IDNOT_TOKEN_URL}
- IDNOT_API_BASE_URL=${IDNOT_API_BASE_URL}
- APP_HOST=${APP_HOST}
- API_BASE_URL=${API_BASE_URL}
- DEFAULT_STORAGE=${DEFAULT_STORAGE}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
- MAILCHIMP_API_KEY=${MAILCHIMP_API_KEY}
- MAILCHIMP_SERVER_PREFIX=${MAILCHIMP_SERVER_PREFIX}
- MAILCHIMP_LIST_ID=${MAILCHIMP_LIST_ID}
- OVH_APPLICATION_KEY=${OVH_APPLICATION_KEY}
- OVH_APPLICATION_SECRET=${OVH_APPLICATION_SECRET}
- OVH_CONSUMER_KEY=${OVH_CONSUMER_KEY}
- OVH_SERVICE_NAME=${OVH_SERVICE_NAME}
ports:
- "0.0.0.0:8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./logs/lecoffre-back:/var/log/lecoffre-back
networks:
btcnet:
aliases:
- lecoffre-back
depends_on:
sdk_relay:
condition: service_healthy
user: appuser
command: ["node", "dist/server.js"]
healthcheck:
test: ["CMD", "sh", "-c", "if curl -f http://localhost:8080/api/v1/health >/dev/null 2>&1; then echo 'LeCoffre Backend ready: API responding'; exit 0; else echo 'LeCoffre Backend starting: API not yet ready'; exit 1; fi"]
interval: 30s
timeout: 10s
retries: 50
start_period: 60s
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
lecoffre-front:
image: git.4nkweb.com/4nk/lecoffre-front:ext

View File

@ -9,7 +9,6 @@
# - sdk_relay: SDK Relay
# - sdk_signer: SDK Signer
# - sdk_storage: SDK Storage
# - lecoffre-back: LeCoffre Backend
# - lecoffre-front: LeCoffre Frontend
# - ihm_client: IHM Client
@ -46,7 +45,6 @@ if [[ $# -lt 1 ]]; then
echo "Projets disponibles:"
echo " - ihm_client"
echo " - lecoffre-front"
echo " - lecoffre-back-mini"
echo " - sdk_relay"
echo " - sdk_storage"
echo " - sdk_signer"

View File

@ -74,7 +74,7 @@ start_monitoring() {
check_config
# Créer les dossiers nécessaires
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storage,lecoffre-back,lecoffre-front,ihm_client,tor,miner,nginx}
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storagelecoffre-front,ihm_client,tor,miner,nginx}
# Démarrer les services de monitoring
log_info "Démarrage de Loki..."

View File

@ -8,12 +8,12 @@ set -e
echo "🔧 Configuration de la centralisation des logs..."
# Créer les dossiers de logs
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storage,lecoffre-back,lecoffre-front,ihm_client,tor,miner,nginx}
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storagelecoffre-front,ihm_client,tor,miner,nginx}
# Créer des fichiers de log de test pour chaque service
echo "📝 Création des fichiers de log de test..."
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-back lecoffre-front ihm_client tor miner nginx; do
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-front ihm_client tor miner nginx; do
log_file="logs/${service}/${service}.log"
echo "$(date): Test log entry for ${service}" > "$log_file"
echo "$(date): Service ${service} started successfully" >> "$log_file"
@ -23,7 +23,7 @@ done
# Créer des fichiers de log avec rotation
echo "🔄 Configuration de la rotation des logs..."
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-back lecoffre-front ihm_client tor miner nginx; do
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-front ihm_client tor miner nginx; do
logrotate_config="conf/logrotate/${service}.conf"
mkdir -p conf/logrotate
@ -72,7 +72,7 @@ else
# Collecter les logs de tous les services
echo "📊 Collecte des logs de tous les services..."
for service in bitcoin-signet blindbit-oracle sdk_relay sdk_signer sdk_storage lecoffre-back lecoffre-front ihm_client tor-proxy signet_miner; do
for service in bitcoin-signet blindbit-oracle sdk_relay sdk_signer sdk_storage lecoffre-front ihm_client tor-proxy signet_miner; do
if docker ps --format "table {{.Names}}" | grep -q "^${service}$"; then
echo "📝 Collecte des logs pour $service..."
mkdir -p "$LOG_DIR/${service##*-}" # Enlever le préfixe si nécessaire

View File

@ -238,7 +238,6 @@ services=(
"sdk_storage:SDK Storage"
"sdk_relay:SDK Relay"
"sdk_signer:SDK Signer"
"lecoffre-back:LeCoffre Backend"
"lecoffre-front:LeCoffre Frontend"
"ihm_client:IHM Client"
"grafana:Grafana"

View File

@ -84,14 +84,6 @@ sync_project() {
fi
;;
"lecoffre-back-mini")
# Backend configuration (si nécessaire)
if [[ -d "$CONF_DIR/lecoffre-back" ]]; then
cp -r "$CONF_DIR/lecoffre-back/"* "$project_path/" 2>/dev/null || true
log_success "Backend configs copiées"
fi
;;
*)
log_warning "Projet $project_name non configuré pour la synchronisation"
return 1
@ -105,7 +97,7 @@ sync_project() {
sync_all() {
log "Synchronisation de tous les projets..."
local projects=("lecoffre_node" "ihm_client" "lecoffre-front" "lecoffre-back-mini")
local projects=("lecoffre_node" "ihm_client" "lecoffre-front")
local success_count=0
local total_count=${#projects[@]}
@ -153,7 +145,6 @@ list_projects() {
echo " - lecoffre_node (bitcoin.conf, sdk_relay.conf)"
echo " - ihm_client (nginx.dev.conf)"
echo " - lecoffre-front (configurations frontend)"
echo " - lecoffre-back-mini (configurations backend)"
}
# Parse des arguments

View File

@ -28,7 +28,7 @@ log_info "🔄 Synchronisation de la configuration de monitoring..."
# Créer la structure de dossiers
log_info "Création de la structure de dossiers..."
mkdir -p conf/{grafana/{provisioning/{datasources,dashboards},dashboards},promtail,logrotate,nginx}
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storage,lecoffre-back,lecoffre-front,ihm_client,tor,miner,nginx}
mkdir -p logs/{bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storagelecoffre-front,ihm_client,tor,miner,nginx}
# Copier la configuration Nginx si elle n'existe pas
if [ ! -f "conf/nginx/grafana.conf" ]; then
@ -89,7 +89,7 @@ fi
# Créer des fichiers de log de test pour chaque service
log_info "Création des fichiers de log de test..."
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-back lecoffre-front ihm_client tor miner nginx; do
for service in bitcoin blindbit sdk_relay sdk_signer sdk_storage lecoffre-front ihm_client tor miner nginx; do
log_file="logs/${service}/${service}.log"
if [ ! -f "$log_file" ]; then
echo "$(date): Test log entry for ${service}" > "$log_file"
@ -156,7 +156,7 @@ log_compression=true
[services]
# Services surveillés
services=bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storage,lecoffre-back,lecoffre-front,ihm_client,tor,miner
services=bitcoin,blindbit,sdk_relay,sdk_signer,sdk_storagelecoffre-front,ihm_client,tor,miner
[alerts]
# Configuration des alertes

View File

@ -70,7 +70,7 @@ test_loki_api() {
test_service_logs() {
echo "📋 Test des logs des services"
services=("bitcoin-signet" "blindbit-oracle" "sdk_relay" "sdk_signer" "sdk_storage" "lecoffre-back" "lecoffre-front" "ihm_client" "signet_miner")
services=("bitcoin-signet" "blindbit-oracle" "sdk_relay" "sdk_signer" "sdk_storage" "lecoffre-front" "ihm_client" "signet_miner")
for service in "${services[@]}"; do
echo " 🔍 Test des logs: $service"
@ -142,7 +142,6 @@ echo "📊 Test des Dashboards Spécialisés"
echo "=================================="
test_dashboard "Bitcoin Miner - Détails" "bitcoin-miner-detailed"
test_dashboard "LeCoffre Backend - Monitoring" "lecoffre-backend"
test_dashboard "SDK Services - Monitoring" "sdk-services"
test_dashboard "Frontend Services - Monitoring" "frontend-services"
test_dashboard "Bitcoin Services - Monitoring" "bitcoin-services"

View File

@ -111,7 +111,6 @@ check_service "blindbit-oracle" "BlindBit Oracle" "http://localhost:8000/tweaks/
check_service "sdk_storage" "SDK Storage" "http://localhost:8081/health" "200"
check_service "sdk_relay" "SDK Relay" "http://localhost:8091/" "200"
check_service "sdk_signer" "SDK Signer" "http://localhost:3001/" "101,426,200"
check_service "lecoffre-back" "LeCoffre Backend" "http://localhost:8080/api/v1/health" "200"
check_service "lecoffre-front" "LeCoffre Frontend" "http://localhost:3004/lecoffre/" "200,301,302,307,308"
check_service "ihm_client" "IHM Client" "http://localhost:3003/" "200"
check_service "grafana" "Grafana" "http://localhost:3005/api/health" "200"

View File

@ -260,7 +260,6 @@ class StatusAPIHandler(BaseHTTPRequestHandler):
{"name": "SDK Relay", "container": "sdk_relay", "protocol": "WebSocket", "port": 8090, "health": lambda: exec_health("sdk_relay", "/scripts/healthchecks/sdk-relay-progress.sh")},
{"name": "SDK Signer", "container": "sdk_signer", "protocol": "WebSocket", "port": 9090, "health": lambda: exec_health("sdk_signer", "/scripts/healthchecks/sdk-signer-progress.sh")},
{"name": "SDK Storage", "container": "sdk_storage", "protocol": "HTTP", "port": 8080, "probe": lambda: http_probe("http://sdk_storage:8080/health")},
{"name": "LeCoffre Backend", "container": "lecoffre-back", "protocol": "HTTP", "port": 8080, "probe": lambda: http_probe("http://lecoffre-back:8080/api/v1/health")},
{"name": "LeCoffre Frontend", "container": "lecoffre-front", "protocol": "HTTP", "port": 3000},
{"name": "IHM Client", "container": "ihm_client", "protocol": "HTTP", "port": 3003},
{"name": "Grafana", "container": "grafana", "protocol": "HTTP", "port": 3000, "probe": lambda: http_probe("http://grafana:3000/api/health")},

View File

@ -20,7 +20,6 @@ app.get('/api', (req, res) => {
{ name: 'SDK Relay', status: 'running', image: 'sdk_relay:ext', ip: '172.20.0.4', port: '8090', protocol: 'WebSocket', uptime: '2h 5m', health: 'healthy' },
{ name: 'SDK Signer', status: 'running', image: 'sdk_signer:ext', ip: '172.20.0.5', port: '9090', protocol: 'WebSocket', uptime: '2h 0m', health: 'healthy' },
{ name: 'SDK Storage', status: 'running', image: 'sdk_storage:ext', ip: '172.20.0.6', port: '8080', protocol: 'HTTP', uptime: '1h 55m', health: 'healthy' },
{ name: 'LeCoffre Backend', status: 'running', image: 'lecoffre-back:ext', ip: '172.20.0.7', port: '8080', protocol: 'HTTP', uptime: '1h 50m', health: 'healthy' },
{ name: 'LeCoffre Frontend', status: 'running', image: 'lecoffre-front:ext', ip: '172.20.0.8', port: '3000', protocol: 'HTTP', uptime: '1h 45m', health: 'healthy' },
{ name: 'IHM Client', status: 'running', image: 'ihm_client:ext', ip: '172.20.0.9', port: '3001', protocol: 'HTTP', uptime: '1h 40m', health: 'healthy' },
{ name: 'Tor Proxy', status: 'running', image: 'btcpayserver/tor:0.4.8.10', ip: '172.20.0.10', port: '9050', protocol: 'SOCKS', uptime: '1h 35m', health: 'healthy' },