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" - "4nk-ia-api.local:172.23.0.10" - "4nk-ia-worker.local:172.23.0.11" - "4nk-ia-postgres.local:172.23.0.12" - "4nk-ia-redis.local:172.23.0.13" - "4nk-ia-minio.local:172.23.0.14" - "4nk-ia-ollama.local:172.23.0.15" - "4nk-ia-anythingllm.local:172.23.0.16" - "4nk-ia-neo4j.local:172.23.0.17" - "4nk-ia-opensearch.local:172.23.0.18" # 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 - ./modules/ihm_client/conf/.env:/app/.env:ro 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 environment: - U32_MAX=4294967295 - BASEURL=http://ihm-client.local - BOOTSTRAPURL=["http://sdk-relay1.local:8090"] - STORAGEURL=http://sdk-storage.local/storage - BLINDBITURL=http://blindbit.local:8000 - DEFAULTAMOUNT=1000 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 - ./projects/lecoffre/lecoffre-front/conf/.env.local:/leCoffre-front/.env.local:ro networks: 4nk_network: ipv4_address: 172.20.0.32 restart: unless-stopped depends_on: - coffre-back-mini.local - ihm_client.local - sdk_signer.local environment: - NEXT_PUBLIC_4NK_URL=http://ihm-client.local:3003 - NEXT_PUBLIC_FRONT_APP_HOST=http://0.0.0.0:3000 - NEXT_PUBLIC_IDNOT_BASE_URL=https://qual-connexion.idnot.fr - NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT=/IdPOAuth2/authorize/idnot_idp_v1 - NEXT_PUBLIC_BACK_API_PROTOCOL=http:// - NEXT_PUBLIC_BACK_API_HOST=0.0.0.0 - NEXT_PUBLIC_BACK_API_PORT=8080 - NEXT_PUBLIC_BACK_API_ROOT_URL=/api - NEXT_PUBLIC_BACK_API_VERSION=/v1 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 volumes: - ./modules/lecoffre/lecoffre-back-mini/conf/.env:/app/.env:ro networks: 4nk_network: ipv4_address: 172.20.0.33 restart: unless-stopped environment: - OVH_SMS_SERVICE_NAME=sms-tt802880-1 - SMS_FACTOR_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4NzgzNiIsImlhdCI6MTcwMTMzOTY1Mi45NDUzOH0.GNoqLb5MDBWuniNlQjbr1PKolwxGqBZe_tf4IMObvHw - MAILCHIMP_LIST_ID=a48d9ad852 - STRIPE_WEBHOOK_SECRET= - STRIPE_STANDARD_SUBSCRIPTION_PRICE_ID=price_1P66fuP5xh1u9BqSHj0O6Uy3 - STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NsRP5xh1u9BqSFgkUDbQY - STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=price_1P66RqP5xh1u9BqSuUzkQNac - STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=price_1P9NpKP5xh1u9BqSApFogvUB - APP_HOST=http://0.0.0.0 - PORT=8080 - NEXT_PUBLIC_4NK_URL=http://ihm-client.local - NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.local:3000 - NEXT_PUBLIC_IDNOT_BASE_URL=https://qual-connexion.idnot.fr - NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT=/IdPOAuth2/authorize/idnot_idp_v1 - NEXT_PUBLIC_IDNOT_CLIENT_ID=4501646203F3EF67 - NEXT_PUBLIC_BACK_API_PROTOCOL=http - NEXT_PUBLIC_BACK_API_HOST=localhost - BACK_API_PORT=8080 - BACK_API_ROOT_URL=/api - BACK_API_VERSION=/v1 - IDNOT_ANNUARY_BASE_URL=https://qual-api.notaires.fr/annuaire - DB_HOST=0.0.0.0 - DB_PORT=5432 - DB_NAME=miniback - DB_USER=miniback - DB_PASSWORD=minibackpassword - LOG_LEVEL=debug 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 nginx-proxy.local: <<: *x-4nk-extra-hosts image: nginx:alpine container_name: nginx-proxy.local hostname: nginx-proxy.local ports: - "443:443" volumes: - ./modules/nginx-proxy/conf/nginx.conf:/etc/nginx/nginx.conf:ro - ./modules/nginx-proxy/certs/local.crt:/etc/nginx/certs/local.crt:ro - ./modules/nginx-proxy/certs/local.key:/etc/nginx/certs/local.key:ro - ./modules/nginx-proxy/logs:/var/log/nginx networks: 4nk_network: ipv4_address: 172.20.0.60 restart: unless-stopped 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