76 lines
2.5 KiB
Text
76 lines
2.5 KiB
Text
|
|
# All containers use host network for Tailscale MagicDNS resolution
|
||
|
|
services:
|
||
|
|
mariadb:
|
||
|
|
image: mariadb:10.11
|
||
|
|
container_name: mempool-db
|
||
|
|
restart: unless-stopped
|
||
|
|
network_mode: host
|
||
|
|
environment:
|
||
|
|
MYSQL_DATABASE: "{{ mariadb_database }}"
|
||
|
|
MYSQL_USER: "{{ mariadb_user }}"
|
||
|
|
MYSQL_PASSWORD: "{{ mariadb_mempool_password }}"
|
||
|
|
MYSQL_ROOT_PASSWORD: "{{ mariadb_mempool_password }}"
|
||
|
|
volumes:
|
||
|
|
- {{ mempool_mysql_dir }}:/var/lib/mysql
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
start_period: 30s
|
||
|
|
|
||
|
|
mempool-backend:
|
||
|
|
image: mempool/backend:{{ mempool_version }}
|
||
|
|
container_name: mempool-backend
|
||
|
|
restart: unless-stopped
|
||
|
|
network_mode: host
|
||
|
|
environment:
|
||
|
|
# Database (localhost since all containers share host network)
|
||
|
|
DATABASE_ENABLED: "true"
|
||
|
|
DATABASE_HOST: "127.0.0.1"
|
||
|
|
DATABASE_DATABASE: "{{ mariadb_database }}"
|
||
|
|
DATABASE_USERNAME: "{{ mariadb_user }}"
|
||
|
|
DATABASE_PASSWORD: "{{ mariadb_mempool_password }}"
|
||
|
|
# Bitcoin Core/Knots (via Tailnet MagicDNS)
|
||
|
|
CORE_RPC_HOST: "{{ bitcoin_host }}"
|
||
|
|
CORE_RPC_PORT: "{{ bitcoin_rpc_port }}"
|
||
|
|
CORE_RPC_USERNAME: "{{ bitcoin_rpc_user }}"
|
||
|
|
CORE_RPC_PASSWORD: "{{ bitcoin_rpc_password }}"
|
||
|
|
# Electrum (Fulcrum via Tailnet MagicDNS)
|
||
|
|
ELECTRUM_HOST: "{{ fulcrum_host }}"
|
||
|
|
ELECTRUM_PORT: "{{ fulcrum_port }}"
|
||
|
|
ELECTRUM_TLS_ENABLED: "{{ fulcrum_tls }}"
|
||
|
|
# Mempool settings
|
||
|
|
MEMPOOL_NETWORK: "{{ mempool_network }}"
|
||
|
|
MEMPOOL_BACKEND: "electrum"
|
||
|
|
MEMPOOL_CLEAR_PROTECTION_MINUTES: "20"
|
||
|
|
MEMPOOL_INDEXING_BLOCKS_AMOUNT: "52560"
|
||
|
|
volumes:
|
||
|
|
- {{ mempool_data_dir }}:/backend/cache
|
||
|
|
depends_on:
|
||
|
|
mariadb:
|
||
|
|
condition: service_healthy
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:8999/api/v1/backend-info"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
start_period: 60s
|
||
|
|
|
||
|
|
mempool-frontend:
|
||
|
|
image: mempool/frontend:{{ mempool_version }}
|
||
|
|
container_name: mempool-frontend
|
||
|
|
restart: unless-stopped
|
||
|
|
network_mode: host
|
||
|
|
environment:
|
||
|
|
FRONTEND_HTTP_PORT: "{{ mempool_frontend_port }}"
|
||
|
|
BACKEND_MAINNET_HTTP_HOST: "127.0.0.1"
|
||
|
|
depends_on:
|
||
|
|
- mempool-backend
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:{{ mempool_frontend_port }}"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
start_period: 30s
|