818 lines
28 KiB
YAML
818 lines
28 KiB
YAML
version: '3.8'
|
|
|
|
x-4nk-extra-hosts: &x-4nk-extra-hosts
|
|
extra_hosts:
|
|
# 4nk-local (172.30.0.0/16)
|
|
- "dnsmasq.4nk-local:172.30.0.1"
|
|
|
|
# modules.4nk-local (172.31.0.0/16)
|
|
- "tor.modules.4nk-local:172.31.0.10"
|
|
- "bitcoin.modules.4nk-local:172.31.0.11"
|
|
- "blindbit-oracle.modules.4nk-local:172.31.0.12"
|
|
- "sdk-storage.modules.4nk-local:172.31.0.13"
|
|
- "sdk-relay1.modules.4nk-local:172.31.0.14"
|
|
- "sdk-relay2.modules.4nk-local:172.31.0.15"
|
|
- "sdk-relay3.modules.4nk-local:172.31.0.16"
|
|
- "nginx-proxy.modules.4nk-local:172.31.0.60"
|
|
|
|
# sdk-relay.modules.4nk-local (172.31.1.0/16)
|
|
- "i1.sdk-relay.modules.4nk-local:172.31.1.11"
|
|
- "i2.sdk-relay.modules.4nk-local:172.31.1.12"
|
|
- "i3.sdk-relay.modules.4nk-local:172.31.1.13"
|
|
|
|
# ia.modules.4nk-local (172.31.2.0/16)
|
|
- "ollama.ia.modules.4nk-local:172.31.2.11"
|
|
- "anythingsqlite.ia.modules.4nk-local:172.31.2.12"
|
|
- "host-api.ia.modules.4nk-local:172.31.2.13"
|
|
- "worker.ia.modules.4nk-local:172.31.2.14"
|
|
|
|
# grafana.modules.4nk-local (172.31.3.0/16)
|
|
- "loki.grafana.modules.4nk-local:172.31.3.51"
|
|
- "prometheus.grafana.modules.4nk-local:172.31.3.52"
|
|
- "promtail.grafana.modules.4nk-local:172.31.3.53"
|
|
- "grafana.grafana.modules.4nk-local:172.31.3.50"
|
|
|
|
# data.modules.4nk-local (172.31.4.0/16)
|
|
- "postgres.data.modules.4nk-local:172.31.4.11"
|
|
- "redis.data.modules.4nk-local:172.31.4.12"
|
|
- "minio.data.modules.4nk-local:172.31.4.13"
|
|
- "neo4j.data.modules.4nk-local:172.31.4.14"
|
|
- "opensearch.data.modules.4nk-local:172.31.4.15"
|
|
|
|
# client.modules.4nk-local (172.31.5.0/16)
|
|
- "sdk-signer.client.modules.4nk-local:172.31.5.11"
|
|
- "ihm.client.modules.4nk-local:172.31.5.12"
|
|
|
|
# projects.4nk-local (172.31.6.0/16)
|
|
- "front.lecoffre.projects.4nk-local:172.31.6.32"
|
|
- "back-mini.lecoffre.projects.4nk-local:172.31.6.34"
|
|
- "ia.lecoffre.projects.4nk-local:172.31.6.33"
|
|
services:
|
|
# ==================== DNS ====================
|
|
|
|
dnsmasq.4nk-local:
|
|
image: andyshinn/dnsmasq:2.78
|
|
container_name: dnsmasq.4nk-local
|
|
hostname: dnsmasq.4nk-local
|
|
ports:
|
|
- "5354:53/udp"
|
|
- "5354:53/tcp"
|
|
volumes:
|
|
- ./4nk-local/dnsmasq/conf/dnsmasq.conf:/etc/dnsmasq.conf:ro
|
|
networks:
|
|
dnsmasq.4nk-local:
|
|
ipv4_address: 172.30.0.1
|
|
modules.4nk-local:
|
|
sdk-relay.modules.4nk-local:
|
|
ia.modules.4nk-local:
|
|
grafana.modules.4nk-local:
|
|
data.modules.4nk-local:
|
|
client.modules.4nk-local:
|
|
lecoffre.projects.4nk-local:
|
|
restart: unless-stopped
|
|
privileged: true
|
|
|
|
# ==================== MODULES > DATA ====================
|
|
|
|
postgres.data.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: postgres:16
|
|
container_name: 4nk-ia-postgres.4nk-local
|
|
hostname: 4nk-ia-postgres.4nk-local
|
|
env_file:
|
|
- ./4nk-local/modules/data/postgres/conf/.env
|
|
volumes:
|
|
- ./4nk-local/modules/data/postgres/data:/var/lib/postgresql/data
|
|
- ./4nk-local/modules/data/postgres/logs:/var/log/postgresql
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d 4nk_db"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
data.modules.4nk-local:
|
|
ipv4_address: 172.31.4.11
|
|
|
|
redis.data.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: redis:7
|
|
container_name: 4nk-ia-redis.4nk-local
|
|
hostname: 4nk-ia-redis.4nk-local
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- ./4nk-local/modules/data/redis/data:/data
|
|
- ./4nk-local/modules/data/redis/logs:/var/log/redis
|
|
ports:
|
|
- "6379:6379"
|
|
restart: unless-stopped
|
|
networks:
|
|
data.modules.4nk-local:
|
|
ipv4_address: 172.31.4.12
|
|
|
|
minio.data.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: minio/minio:latest
|
|
container_name: minio.data.modules.4nk-local
|
|
hostname: minio.data.modules.4nk-local
|
|
command: server /data --console-address ":9001"
|
|
env_file:
|
|
- ./4nk-local/modules/data/minio/conf/.env
|
|
volumes:
|
|
- ./4nk-local/modules/data/minio/data:/data
|
|
- ./4nk-local/modules/data/minio/logs:/var/log/minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
restart: unless-stopped
|
|
networks:
|
|
data.modules.4nk-local:
|
|
ipv4_address: 172.31.4.13
|
|
|
|
neo4j.data.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: neo4j:5
|
|
container_name: neo4j.data.modules.4nk-local
|
|
hostname: neo4j.data.modules.4nk-local
|
|
env_file:
|
|
- ./4nk-local/modules/data/neo4j/conf/.env
|
|
volumes:
|
|
- ./4nk-local/modules/data/neo4j/data:/data
|
|
- ./4nk-local/modules/data/neo4j/logs:/var/log/neo4j
|
|
ports:
|
|
- "7474:7474"
|
|
- "7687:7687"
|
|
restart: unless-stopped
|
|
networks:
|
|
data.modules.4nk-local:
|
|
ipv4_address: 172.31.4.14
|
|
|
|
opensearch.data.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: opensearchproject/opensearch:2.14.0
|
|
container_name: opensearch.data.modules.4nk-local
|
|
hostname: 4nk-ia-opensearch.4nk-local
|
|
environment:
|
|
- discovery.type=single-node
|
|
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=OpenSearch2025!
|
|
ulimits:
|
|
memlock:
|
|
soft: -1
|
|
hard: -1
|
|
volumes:
|
|
- ./4nk-local/modules/data/opensearch/data:/usr/share/opensearch/data
|
|
- ./4nk-local/modules/data/opensearch/logs:/var/log/opensearch
|
|
ports:
|
|
- "9200:9200"
|
|
restart: unless-stopped
|
|
networks:
|
|
data.modules.4nk-local:
|
|
ipv4_address: 172.31.4.15
|
|
|
|
# ==================== MODULES ====================
|
|
|
|
tor.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: dperson/torproxy:latest
|
|
container_name: tor.modules.4nk-local
|
|
hostname: tor.modules.4nk-local
|
|
ports:
|
|
- "9050:9050"
|
|
- "9051:9051"
|
|
networks:
|
|
modules.4nk-local:
|
|
ipv4_address: 172.31.0.10
|
|
restart: unless-stopped
|
|
|
|
bitcoin.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: ruimarinho/bitcoin-core:latest
|
|
container_name: bitcoin.modules.4nk-local
|
|
hostname: bitcoin.modules.4nk-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:
|
|
- ./4nk-local/modules/bitcoin/data:/home/bitcoin/.bitcoin
|
|
- ./4nk-local/modules/bitcoin/conf/bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf
|
|
- ./4nk-local/modules/bitcoin/logs:/home/bitcoin/.bitcoin/logs
|
|
networks:
|
|
modules.4nk-local:
|
|
ipv4_address: 172.31.0.11
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- tor.modules.4nk-local
|
|
|
|
blindbit-oracle.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/blindbit-oracle:dev
|
|
container_name: blindbit-oracle.modules.4nk-local
|
|
hostname: blindbit-oracle.modules.4nk-local
|
|
entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.modules.4nk-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:
|
|
- ./4nk-local/modules/blindbit-oracle/data:/blindbit-oracle
|
|
- ./4nk-local/modules/blindbit-oracle/conf/blindbit.toml:/blindbit-oracle/blindbit.toml:ro
|
|
- ./4nk-local/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:
|
|
modules.4nk-local:
|
|
ipv4_address: 172.31.0.12
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- bitcoin.modules.4nk-local
|
|
healthcheck:
|
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--timeout=5", "--spider", "http://localhost:8000" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
environment:
|
|
- host=blindbit-oracle.modules.4nk-local:8000
|
|
- chain=signet
|
|
- rpc_endpoint=http://bitcoin.modules.4nk-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
|
|
|
|
sdk-storage.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/sdk_storage:dev
|
|
container_name: sdk-storage.modules.4nk-local
|
|
hostname: sdk-storage.modules.4nk-local
|
|
ports:
|
|
- "8081:8080"
|
|
volumes:
|
|
- ./4nk-local/modules/sdk-storage/conf/sdk_storage.conf:/usr/local/bin/sdk_storage.conf:ro
|
|
- ./4nk-local/modules/sdk-storage/logs:/app/logs
|
|
networks:
|
|
modules.4nk-local:
|
|
ipv4_address: 172.31.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
|
|
|
|
# ==================== MODULES > RELAY ====================
|
|
|
|
i1.sdk-relay.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
|
container_name: i1.sdk-relay.modules.4nk-local
|
|
hostname: i1.sdk-relay.modules.4nk-local
|
|
entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.modules.4nk-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:
|
|
- ./4nk-local/modules/sdk-relay/i1/conf/1.sdk-relay.modulesconf:/home/bitcoin/.conf:ro
|
|
- ./4nk-local/modules/sdk-relay/i1/logs:/home/bitcoin/logs
|
|
working_dir: /home/bitcoin
|
|
networks:
|
|
sdk-relay.modules.4nk-local:
|
|
ipv4_address: 172.31.1.11
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- blindbit-oracle.modules.4nk-local
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
i2.sdk-relay.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
|
container_name: i2.sdk-relay.modules.4nk-local
|
|
hostname: i2.sdk-relay.modules.4nk-local
|
|
entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.modules.4nk-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:
|
|
- ./4nk-local/modules/sdk-relay/i2/conf/sdk_relay2.conf:/home/bitcoin/.conf:ro
|
|
- ./4nk-local/modules/sdk-relay/i2/logs:/home/bitcoin/logs
|
|
working_dir: /home/bitcoin
|
|
networks:
|
|
sdk-relay.modules.4nk-local:
|
|
ipv4_address: 172.31.1.12
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- blindbit-oracle.modules.4nk-local
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
i3.sdk-relay.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/sdk_relay:dev
|
|
container_name: i3.sdk-relay.modules.4nk-local
|
|
hostname: i3.sdk-relay.modules.4nk-local
|
|
entrypoint: ["/bin/sh","-c","for i in $(seq 1 300); do if getent hosts bitcoin.modules.4nk-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:
|
|
- ./4nk-local/modules/sdk-relay/i3/conf/sdk_relay3.conf:/home/bitcoin/.conf:ro
|
|
- ./4nk-local/modules/sdk-relay/i3/logs:/home/bitcoin/logs
|
|
working_dir: /home/bitcoin
|
|
networks:
|
|
sdk-relay.modules.4nk-local:
|
|
ipv4_address: 172.31.1.13
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- blindbit-oracle.modules.4nk-local
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:8090/health" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# ==================== MODULES > CLIENT MODES ====================
|
|
|
|
sdk-signer.client.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/sdk_signer:dev
|
|
container_name: sdk-signer.client.modules.4nk-local
|
|
hostname: sdk-signer.client.modules.4nk-local
|
|
ports:
|
|
- "9093:9090"
|
|
volumes:
|
|
- ./4nk-local/modules/client/sdk-signer/conf/sdk_signer.conf:/usr/local/bin/sdk_signer.conf:ro
|
|
- ./4nk-local/modules/client/sdk-signer/data:/app/data
|
|
- ./4nk-local/modules/client/sdk-signer/logs:/usr/src/app/logs
|
|
networks:
|
|
client.modules.4nk-local:
|
|
ipv4_address: 172.31.5.11
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- sdk-storage.modules.4nk-local
|
|
- i1.sdk-relay.modules.4nk-local
|
|
- i2.sdk-relay.modules.4nk-local
|
|
- i3.sdk-relay.modules.4nk-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.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/ihm_client:dev
|
|
container_name: ihm.client.modules.4nk-local
|
|
hostname: ihm.client.modules.4nk-local
|
|
ports:
|
|
- "8080:80"
|
|
- "3003:3003"
|
|
volumes:
|
|
- ./4nk-local/modules/client/ihm/logs:/var/log/ihm_client
|
|
- ./4nk-local/modules/client/ihm/conf/.env:/app/.env:ro
|
|
networks:
|
|
client.modules.4nk-local:
|
|
ipv4_address: 172.31.5.12
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- sdk-storage.modules.4nk-local
|
|
- i1.sdk-relay.modules.4nk-local
|
|
- i2.sdk-relay.modules.4nk-local
|
|
- i3.sdk-relay.modules.4nk-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.modules.4nk-local
|
|
- BOOTSTRAPURL=["http://i1.sdk-relay.4nk-local:8090"]
|
|
- STORAGEURL=http://sdk-storage.modules.4nk-local/storage
|
|
- BLINDBITURL=http://blindbit.modules.4nk-local:8000
|
|
- DEFAULTAMOUNT=1000
|
|
|
|
# ==================== MODULES > IA ====================
|
|
|
|
ollama.ia.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: ollama/ollama:latest
|
|
container_name: ollama.ia.modules.4nk-local
|
|
hostname: ollama.ia.modules.4nk-local
|
|
volumes:
|
|
- ./4nk-local/modules/ia/ollama/data:/root/.ollama
|
|
- ./4nk-local/modules/ia/ollama/logs:/var/log/ollama
|
|
ports:
|
|
- "11435:11434" # Port modifié pour éviter les conflits
|
|
environment:
|
|
- OLLAMA_HOST=0.0.0.0
|
|
restart: unless-stopped
|
|
profiles: ["production", "development"]
|
|
networks:
|
|
ia.modules.4nk-local:
|
|
ipv4_address: 172.31.2.11
|
|
|
|
anythingsqlite.ia.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: mintplexlabs/anythingllm:latest
|
|
container_name: anythingsqlite.ia.modules.4nk-local
|
|
hostname: anythingsqlite.ia.modules.4nk-local
|
|
environment:
|
|
- DISABLE_AUTH=true
|
|
- STORAGE_DIR=/app/server/storage
|
|
depends_on:
|
|
- ollama.ia.modules.4nk-local
|
|
ports:
|
|
- "3001:3001"
|
|
volumes:
|
|
- ./4nk-local/modules/ia/anythingsqlite/data:/app/server/storage
|
|
- ./4nk-local/modules/ia/anythingsqlite/logs:/var/log/anythingllm
|
|
restart: unless-stopped
|
|
profiles: ["production", "development"]
|
|
networks:
|
|
ia.modules.4nk-local:
|
|
ipv4_address: 172.31.2.12
|
|
|
|
host-api.ia.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
build:
|
|
context: ./docker/host-api
|
|
dockerfile: Dockerfile
|
|
container_name: host-api.ia.modules.4nk-local
|
|
hostname: host-api.ia.modules.4nk-local
|
|
labels:
|
|
- logging=promtail
|
|
- project=4nk_ia_back
|
|
env_file:
|
|
- ./4nk-local/modules/ia/host-api/conf/.env
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres.data.modules.4nk-local:5432/$POSTGRES_DB
|
|
REDIS_URL: redis://redis.data.modules.4nk-local:6379/0
|
|
MINIO_ENDPOINT: 4nk-ia-minio.4nk-local:9000
|
|
MINIO_BUCKET: 4nk-bucket
|
|
ANYLLM_BASE_URL: http://4nk-ia-anythingllm.4nk-local:3001
|
|
ANYLLM_API_KEY: dummy_key
|
|
OLLAMA_BASE_URL: http://4nk-ia-ollama.4nk-local:11434
|
|
OPENSEARCH_URL: http://4nk-ia-opensearch.4nk-local:9200
|
|
NEO4J_URL: bolt://4nk-ia-neo4j.4nk-local:7687
|
|
NEO4J_AUTH: neo4j/neo4j
|
|
# Configuration de l'API
|
|
API_HOST: 0.0.0.0
|
|
API_PORT: 8000
|
|
API_WORKERS: 4
|
|
LOG_LEVEL: INFO
|
|
LOG_FORMAT: json
|
|
# Sécurité
|
|
SECRET_KEY: your_secret_key_here
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: 30
|
|
volumes:
|
|
- ./4nk-local/modules/ia/host-api/data:/app
|
|
- ./4nk-local/modules/ia/host-api/logs:/app/logs
|
|
ports:
|
|
- "8001:8000" # Port externe 8001 pour éviter les conflits
|
|
depends_on:
|
|
postgres.data.modules.4nk-local:
|
|
condition: service_healthy
|
|
redis.data.modules.4nk-local:
|
|
condition: service_started
|
|
minio.data.modules.4nk-local:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
restart: unless-stopped
|
|
networks:
|
|
ia.modules.4nk-local:
|
|
ipv4_address: 172.31.2.13
|
|
|
|
worker.ia.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
build:
|
|
context: ./
|
|
dockerfile: docker/worker/Dockerfile
|
|
container_name: worker.ia.modules.4nk-local
|
|
hostname: worker.ia.modules.4nk-local
|
|
labels:
|
|
- logging=promtail
|
|
- project=4nk_ia_back
|
|
env_file:
|
|
- ./4nk-local/modules/ia/worker/conf/.env
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres.data.modules.4nk-local:5432/$POSTGRES_DB
|
|
REDIS_URL: redis://redis.data.modules.4nk-local:6379/0
|
|
MINIO_ENDPOINT: 4nk-ia-minio.4nk-local:9000
|
|
MINIO_BUCKET: 4nk-bucket
|
|
ANYLLM_BASE_URL: http://4nk-ia-anythingllm.4nk-local:3001
|
|
ANYLLM_API_KEY: dummy_key
|
|
OLLAMA_BASE_URL: http://4nk-ia-ollama.4nk-local:11434
|
|
OPENSEARCH_URL: http://4nk-ia-opensearch.4nk-local:9200
|
|
NEO4J_URL: bolt://4nk-ia-neo4j.4nk-local:7687
|
|
NEO4J_AUTH: neo4j/neo4j
|
|
volumes:
|
|
- ./4nk-local/modules/ia/worker/data:/app
|
|
- ./4nk-local/modules/ia/worker/logs:/app/logs
|
|
depends_on:
|
|
- host-api.ia.modules.4nk-local
|
|
restart: unless-stopped
|
|
profiles: ["production"]
|
|
networks:
|
|
ia.modules.4nk-local:
|
|
ipv4_address: 172.31.2.14
|
|
|
|
# ==================== MODULES >GRAFANA ====================
|
|
|
|
loki.grafana.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: grafana/loki:2.9.0
|
|
container_name: loki.grafana.modules.4nk-local
|
|
hostname: loki.grafana.modules.4nk-local
|
|
ports:
|
|
- "3100:3100"
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
volumes:
|
|
- ./4nk-local/modules/grafana/loki/conf/loki-config.yaml:/etc/loki/local-config.yaml:ro
|
|
- ./4nk-local/modules/grafana/loki/data:/loki
|
|
- ./4nk-local/modules/grafana/loki/logs:/var/log/loki
|
|
networks:
|
|
grafana.modules.4nk-local:
|
|
ipv4_address: 172.31.3.51
|
|
restart: unless-stopped
|
|
|
|
prometheus.grafana.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: prom/prometheus:v2.54.1
|
|
container_name: prometheus.grafana.modules.4nk-local
|
|
hostname: prometheus.grafana.modules.4nk-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:
|
|
- ./4nk-local/modules/grafana/prometheus/conf/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- ./4nk-local/modules/grafana/prometheus/data:/prometheus
|
|
- ./4nk-local/modules/grafana/prometheus/logs:/var/log/prometheus
|
|
networks:
|
|
grafana.modules.4nk-local:
|
|
ipv4_address: 172.31.3.52
|
|
restart: unless-stopped
|
|
|
|
promtail.grafana.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: grafana/promtail:2.9.0
|
|
container_name: promtail.grafana.modules.4nk-local
|
|
hostname: promtail.grafana.modules.4nk-local
|
|
command: -config.file=/etc/promtail/config.yml
|
|
volumes:
|
|
- ./4nk-local/modules/grafana/promtail/conf/promtail-config.yml:/etc/promtail/config.yml:ro
|
|
- ./4nk-local/modules/grafana/promtail/logs:/var/log/promtail
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
- /var/log/docker:/var/log/docker:ro
|
|
- ./4nk-local/modules:/workspace/modules:ro
|
|
- ./4nk-local/projects:/workspace/projects:ro
|
|
- ./4nk-local/modules/grafana/grafana/logs:/workspace/logs:ro
|
|
networks:
|
|
grafana.modules.4nk-local:
|
|
ipv4_address: 172.31.3.53
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- loki.grafana.modules.4nk-local
|
|
|
|
grafana.grafana.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: grafana/grafana:10.0.0
|
|
container_name: grafana.grafana.modules.4nk-local
|
|
hostname: grafana.grafana.modules.4nk-local
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=admin
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- GF_SERVER_ROOT_URL=http://grafana.grafanalocal:3000
|
|
- GF_SERVER_SERVE_FROM_SUB_PATH=false
|
|
volumes:
|
|
- ./4nk-local/modules/grafana/grafana/data:/var/lib/grafana
|
|
- ./4nk-local/modules/grafana/grafana/conf/grafana.ini:/etc/grafana/grafana.ini:ro
|
|
- ./4nk-local/modules/grafana/grafana/conf/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml:ro
|
|
- ./4nk-local/modules/grafana/grafana/conf/dashboards:/etc/grafana/provisioning/dashboards:ro
|
|
- ./4nk-local/modules/grafana/grafana/logs:/var/log/grafana
|
|
networks:
|
|
grafana.modules.4nk-local:
|
|
ipv4_address: 172.31.3.50
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- loki.grafana.modules.4nk-local
|
|
- prometheus.grafana.modules.4nk-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
|
|
|
|
# ==================== MODULES OTHER ====================
|
|
|
|
nginx-proxy.modules.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: nginx:alpine
|
|
container_name: nginx-proxy.modules.4nk-local
|
|
hostname: nginx-proxy.modules.4nk-local
|
|
ports:
|
|
- "443:443"
|
|
volumes:
|
|
- ./4nk-local/modules/nginx-proxy/conf/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./4nk-local/modules/nginx-proxy/certs/local.crt:/etc/nginx/certs/local.crt:ro
|
|
- ./4nk-local/modules/nginx-proxy/certs/local.key:/etc/nginx/certs/local.key:ro
|
|
- ./4nk-local/modules/nginx-proxy/logs:/var/log/nginx
|
|
networks:
|
|
modules.4nk-local:
|
|
ipv4_address: 172.31.0.60
|
|
restart: unless-stopped
|
|
|
|
# ==================== PROJECTS > LECOFFRE ====================
|
|
|
|
front.lecoffre.projects.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/lecoffre-front:ajanin
|
|
container_name: front.lecoffre.projects.4nk-local
|
|
hostname: front.lecoffre.projects.4nk-local
|
|
volumes:
|
|
- ./4nk-local/projects/lecoffre/front/logs:/logs
|
|
- ./4nk-local/projects/lecoffre/front/conf/.env.4nk-local:/leCoffre-front/.env.4nk-local:ro
|
|
networks:
|
|
lecoffre.projects.4nk-local:
|
|
ipv4_address: 172.31.6.32
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- back-mini.lecoffre.projects.4nk-local
|
|
- ihm.client.modules.4nk-local
|
|
- sdk-signer.client.modules.4nk-local
|
|
environment:
|
|
- NEXT_PUBLIC_4NK_URL=http://ihm.client.modules.4nk-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
|
|
|
|
|
|
ia.lecoffre.projects.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/4nk-ia-front:dev
|
|
container_name: ia.lecoffre.projects.4nk-local
|
|
hostname: ia.lecoffre.projects.4nk-local
|
|
volumes:
|
|
- ./4nk-local/projects/lecoffre/ia/logs:/logs
|
|
networks:
|
|
lecoffre.projects.4nk-local:
|
|
ipv4_address: 172.31.6.33
|
|
ia.modules.4nk-local:
|
|
ipv4_address: 172.31.2.15
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- host-api.ia.modules.4nk-local
|
|
|
|
back-mini.lecoffre.projects.4nk-local:
|
|
<<: *x-4nk-extra-hosts
|
|
image: git.4nkweb.com/4nk/lecoffre-back-mini:dev
|
|
container_name: back-mini.lecoffre.projects.4nk-local
|
|
hostname: back-mini.lecoffre.projects.4nk-local
|
|
volumes:
|
|
- ./4nk-local/projects/lecoffre/back-mini/conf/.env:/app/.env:ro
|
|
networks:
|
|
lecoffre.projects.4nk-local:
|
|
ipv4_address: 172.31.6.34
|
|
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.modules.4nk-local
|
|
- NEXT_PUBLIC_FRONT_APP_HOST=http://coffre-front.4nk-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
|
|
|
|
# Networks
|
|
|
|
networks:
|
|
dnsmasq.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.30.0.0/16
|
|
gateway: 172.30.0.1
|
|
modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.0.0/16
|
|
gateway: 172.31.0.1
|
|
sdk-relay.modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.1.0/16
|
|
gateway: 172.31.1.1
|
|
ia.modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.2.0/16
|
|
gateway: 172.31.2.1
|
|
grafana.modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.3.0/16
|
|
gateway: 172.31.3.1
|
|
data.modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.4.0/16
|
|
gateway: 172.31.4.1
|
|
client.modules.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.5.0/16
|
|
gateway: 172.31.5.1
|
|
lecoffre.projects.4nk-local:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.6.0/16
|
|
gateway: 172.31.6.1
|