version: '3.8' x-4nk-extra-hosts: &x-4nk-extra-hosts extra_hosts: - "tor.local:172.20.0.10" - "bitcoin.local:172.20.0.11" - "blindbit-oracle.local:172.20.0.12" - "sdk-storage.local:172.20.0.13" - "sdk-relay1.local:172.20.0.14" - "sdk-relay2.local:172.20.0.15" - "sdk-relay3.local:172.20.0.16" - "sdk-signer.local:172.20.0.17" - "ihm-client.local:172.20.0.18" - "coffre-front.local:172.20.0.32" - "coffre-back-mini.local:172.20.0.33" - "grafana-central.local:172.20.0.50" - "loki.local:172.20.0.51" - "prometheus.local:172.20.0.52" - "promtail.local:172.20.0.53" # Updated to use newer Go-based images for builds; placeholder for future dynamic tag adjustments services: tor.local: <<: *x-4nk-extra-hosts image: dperson/torproxy:latest container_name: tor.local hostname: tor.local ports: - "9050:9050" - "9051:9051" networks: 4nk_network: ipv4_address: 172.20.0.10 restart: unless-stopped bitcoin.local: <<: *x-4nk-extra-hosts image: ruimarinho/bitcoin-core:latest container_name: bitcoin.local hostname: bitcoin.local entrypoint: ["/bin/sh","-c","for i in $(seq 1 30); do if grep -q '172.20.0.11' /proc/net/fib_trie 2>/dev/null; then break; fi; sleep 1; done; exec /entrypoint.sh bitcoind"] ports: - "38332:38332" - "29000:29000" volumes: - ./modules/bitcoin/data:/home/bitcoin/.bitcoin - ./modules/bitcoin/conf/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf - ./modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs dns: - 172.20.0.1 # Gateway Docker pour accéder à dnsmasq networks: 4nk_network: ipv4_address: 172.20.0.11 restart: unless-stopped depends_on: - tor.local blindbit-oracle.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/blindbit-oracle:dev container_name: blindbit-oracle.local hostname: blindbit-oracle.local entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.local >/dev/null 2>&1 && [ -f /home/bitcoin/.bitcoin/signet/.cookie ]; then break; fi; sleep 1; done; exec \"$@\"","--"] ports: - "8000:8000" command: [ "/main", "--datadir", "/blindbit-oracle" ] working_dir: / volumes: - ./modules/blindbit-oracle/data:/blindbit-oracle - ./modules/blindbit-oracle/conf/blindbit.toml:/blindbit-oracle/blindbit.toml:ro - ./modules/blindbit-oracle/logs:/blindbit-oracle/logs # Accès au répertoire Bitcoin pour le cookie RPC - ./modules/bitcoin/data:/home/bitcoin/.bitcoin:ro networks: 4nk_network: ipv4_address: 172.20.0.12 restart: unless-stopped depends_on: - bitcoin.local healthcheck: test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8000" ] interval: 30s timeout: 10s retries: 3 start_period: 40s sdk_storage.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/sdk_storage:dev container_name: sdk-storage.local hostname: sdk-storage.local ports: - "8081:8080" volumes: - ./modules/sdk_storage/conf/sdk_storage.conf:/usr/local/bin/sdk_storage.conf:ro - ./modules/sdk_storage/log:/app/logs networks: 4nk_network: ipv4_address: 172.20.0.13 restart: unless-stopped healthcheck: test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8080" ] interval: 30s timeout: 10s retries: 3 start_period: 40s sdk_relay1.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/sdk_relay:dev container_name: sdk-relay1.local hostname: sdk-relay1.local entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.local >/dev/null 2>&1 && [ -f /home/bitcoin/.bitcoin/signet/.cookie ]; then break; fi; sleep 1; done; exec \"$@\""] ports: - "8090:8090" - "8091:8091" environment: - RELAY_RPC_USER="" - RELAY_RPC_PASSWORD="" - COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie" - relay_rpc_user="" - relay_rpc_password="" - cookie_path="/home/bitcoin/.bitcoin/signet/.cookie" volumes: - ./modules/sdk_relay1/conf/sdk_relay1.conf:/home/bitcoin/.conf:ro - ./modules/sdk_relay1/logs:/home/bitcoin/logs working_dir: /home/bitcoin networks: 4nk_network: ipv4_address: 172.20.0.14 restart: unless-stopped depends_on: - blindbit-oracle.local healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ] interval: 30s timeout: 10s retries: 3 start_period: 40s sdk_relay2.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/sdk_relay:dev container_name: sdk-relay2.local hostname: sdk-relay2.local entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.local >/dev/null 2>&1 && [ -f /home/bitcoin/.bitcoin/signet/.cookie ]; then break; fi; sleep 1; done; exec \"$@\""] ports: - "8092:8090" - "8093:8091" environment: - RELAY_RPC_USER="" - RELAY_RPC_PASSWORD="" - COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie" - relay_rpc_user="" - relay_rpc_password="" - cookie_path="/home/bitcoin/.bitcoin/signet/.cookie" volumes: - ./modules/sdk_relay2/conf/sdk_relay2.conf:/home/bitcoin/.conf:ro - ./modules/sdk_relay2/logs:/home/bitcoin/logs working_dir: /home/bitcoin networks: 4nk_network: ipv4_address: 172.20.0.15 restart: unless-stopped depends_on: - blindbit-oracle.local healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ] interval: 30s timeout: 10s retries: 3 start_period: 40s sdk_relay3.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/sdk_relay:dev container_name: sdk-relay3.local hostname: sdk-relay3.local entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.local >/dev/null 2>&1 && [ -f /home/bitcoin/.bitcoin/signet/.cookie ]; then break; fi; sleep 1; done; exec \"$@\""] ports: - "8094:8090" - "8095:8091" environment: - RELAY_RPC_USER="" - RELAY_RPC_PASSWORD="" - COOKIE_PATH="/home/bitcoin/.bitcoin/signet/.cookie" - relay_rpc_user="" - relay_rpc_password="" - cookie_path="/home/bitcoin/.bitcoin/signet/.cookie" volumes: - ./modules/sdk_relay3/conf/sdk_relay3.conf:/home/bitcoin/.conf:ro - ./modules/sdk_relay3/logs:/home/bitcoin/logs working_dir: /home/bitcoin networks: 4nk_network: ipv4_address: 172.20.0.16 restart: unless-stopped depends_on: - blindbit-oracle.local healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ] interval: 30s timeout: 10s retries: 3 start_period: 40s sdk_signer.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/sdk_signer:dev container_name: sdk-signer.local hostname: sdk-signer.local ports: - "9093:9090" volumes: - ./modules/sdk_signer/conf/sdk_signer.conf:/usr/local/bin/sdk_signer.conf:ro - ./modules/sdk_signer/data:/app/data - ./modules/sdk_signer/logs:/usr/src/app/logs networks: 4nk_network: ipv4_address: 172.20.0.17 restart: unless-stopped depends_on: - sdk_storage.local - sdk_relay1.local - sdk_relay2.local - sdk_relay3.local healthcheck: test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:9090" ] interval: 30s timeout: 10s retries: 3 start_period: 40s ihm_client.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/ihm_client:dev container_name: ihm-client.local hostname: ihm-client.local ports: - "8080:80" - "3003:3003" volumes: - ./modules/ihm_client/logs:/var/log/ihm_client networks: 4nk_network: ipv4_address: 172.20.0.18 restart: unless-stopped depends_on: - sdk_storage.local - sdk_relay1.local - sdk_relay2.local - sdk_relay3.local healthcheck: test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost" ] interval: 30s timeout: 10s retries: 3 start_period: 40s coffre-front.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/lecoffre-front:dev container_name: coffre-front.local hostname: coffre-front.local volumes: - ./projects/lecoffre/lecoffre-front/logs:/logs networks: 4nk_network: ipv4_address: 172.20.0.32 restart: unless-stopped depends_on: - coffre-back-mini.local - ihm_client.local - sdk_signer.local coffre-back-mini.local: <<: *x-4nk-extra-hosts image: git.4nkweb.com/4nk/lecoffre-back-mini:dev container_name: coffre-back-mini.local hostname: coffre-back-mini.local networks: 4nk_network: ipv4_address: 172.20.0.33 restart: unless-stopped loki.local: <<: *x-4nk-extra-hosts image: grafana/loki:2.9.0 container_name: loki.local hostname: loki.local ports: - "3100:3100" command: -config.file=/etc/loki/local-config.yaml volumes: - ./conf/monitoring/loki-config.yaml:/etc/loki/local-config.yaml:ro - loki_data:/loki networks: 4nk_network: ipv4_address: 172.20.0.51 restart: unless-stopped prometheus.local: <<: *x-4nk-extra-hosts image: prom/prometheus:v2.54.1 container_name: prometheus.local hostname: prometheus.local ports: - "9092:9091" command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--web.console.libraries=/etc/prometheus/console_libraries' - '--web.console.templates=/etc/prometheus/consoles' - '--storage.tsdb.retention.time=200h' - '--web.enable-lifecycle' volumes: - ./conf/monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro - prometheus_data:/prometheus networks: 4nk_network: ipv4_address: 172.20.0.52 restart: unless-stopped promtail.local: <<: *x-4nk-extra-hosts image: grafana/promtail:2.9.0 container_name: promtail.local hostname: promtail.local command: -config.file=/etc/promtail/config.yml volumes: - ./conf/monitoring/promtail-config.yml:/etc/promtail/config.yml:ro - /var/lib/docker/containers:/var/lib/docker/containers:ro - /var/log/docker:/var/log/docker:ro - ./modules:/workspace/modules:ro - ./projects:/workspace/projects:ro - ./modules/grafana-central/logs:/workspace/logs:ro networks: 4nk_network: ipv4_address: 172.20.0.53 restart: unless-stopped depends_on: - loki.local grafana-central.local: <<: *x-4nk-extra-hosts image: grafana/grafana:10.0.0 container_name: grafana-central.local hostname: grafana-central.local ports: - "3000:3000" environment: - GF_SECURITY_ADMIN_PASSWORD=admin - GF_USERS_ALLOW_SIGN_UP=false - GF_SERVER_ROOT_URL=http://grafana-central.local:3000 - GF_SERVER_SERVE_FROM_SUB_PATH=false volumes: - grafana_central_data:/var/lib/grafana - ./conf/monitoring/grafana.ini:/etc/grafana/grafana.ini:ro - ./conf/monitoring/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml:ro - ./modules/grafana-central/dashboards:/etc/grafana/provisioning/dashboards:ro - ./modules/grafana-central/logs:/var/log/grafana networks: 4nk_network: ipv4_address: 172.20.0.50 restart: unless-stopped depends_on: - loki.local - prometheus.local healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:3000/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: grafana_central_data: loki_data: prometheus_data: networks: 4nk_network: driver: bridge ipam: config: - subnet: 172.20.0.0/16 gateway: 172.20.0.1 4nk_projects_net: driver: bridge ipam: config: - subnet: 172.21.0.0/16 gateway: 172.21.0.1