337 lines
9.6 KiB
YAML
337 lines
9.6 KiB
YAML
# Lux Universe - Mainnet Stack
|
|
# Full 5-node validator network for production
|
|
#
|
|
# Usage:
|
|
# docker compose -f compose.mainnet.yml up -d
|
|
# docker compose -f compose.mainnet.yml --profile explorers up -d
|
|
# docker compose -f compose.mainnet.yml down
|
|
#
|
|
# Ports:
|
|
# 9630-9638: Node HTTP/Staking (5 validators)
|
|
# 4010-4013: Block Explorers (LUX, Zoo, Hanzo, SPC)
|
|
# 8080: LXD Gateway
|
|
#
|
|
# Networks:
|
|
# LUX: Chain 96369 (C-Chain mainnet)
|
|
# Zoo: Chain 200200
|
|
# Hanzo: Chain 36963
|
|
# SPC: Chain 36911
|
|
#
|
|
# C-Chain: 1,082,780 blocks | Zoo: 799 blocks
|
|
|
|
networks:
|
|
mainnet:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.30.0.0/24
|
|
|
|
volumes:
|
|
mainnet-postgres:
|
|
mainnet-redis:
|
|
mainnet-node-1-data:
|
|
mainnet-node-2-data:
|
|
mainnet-node-3-data:
|
|
mainnet-node-4-data:
|
|
mainnet-node-5-data:
|
|
|
|
x-node-common: &node-common
|
|
image: ghcr.io/luxfi/node:${NODE_VERSION:-latest}
|
|
restart: unless-stopped
|
|
networks:
|
|
- mainnet
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
environment:
|
|
NETWORK_ID: 1
|
|
|
|
services:
|
|
# Infrastructure
|
|
mainnet-postgres:
|
|
image: ghcr.io/hanzoai/sql:0.1.0
|
|
container_name: mainnet-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: mainnet
|
|
volumes:
|
|
- mainnet-postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- "15432:5432"
|
|
networks:
|
|
- mainnet
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
mainnet-redis:
|
|
image: ghcr.io/hanzoai/kv:0.1.0
|
|
container_name: mainnet-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- mainnet-redis:/data
|
|
ports:
|
|
- "16379:6379"
|
|
networks:
|
|
- mainnet
|
|
|
|
# Bootstrap Node (Node 1) - Mounts existing chaindata
|
|
mainnet-node-1:
|
|
<<: *node-common
|
|
container_name: mainnet-node-1
|
|
volumes:
|
|
- mainnet-node-1-data:/app/data
|
|
- ~/.lux/keys/node1:/app/keys:ro
|
|
- ../genesis/configs/mainnet:/app/genesis:ro
|
|
- ../state/chains/zoo-mainnet:/app/chains/zoo:ro
|
|
- ../state/rlp/lux-mainnet:/app/rlp:ro
|
|
ports:
|
|
- "9630:9630"
|
|
- "9631:9631"
|
|
command: >
|
|
--network-id=1
|
|
--http-host=0.0.0.0
|
|
--http-port=9630
|
|
--staking-port=9631
|
|
--staking-host=0.0.0.0
|
|
--network-allow-private-ips=true
|
|
--genesis-file=/app/genesis/genesis.json
|
|
--staking-tls-cert-file=/app/keys/staking/staker.crt
|
|
--staking-tls-key-file=/app/keys/staking/staker.key
|
|
--staking-signer-key-file=/app/keys/bls/signer.key
|
|
--index-enabled
|
|
--api-admin-enabled
|
|
--data-dir=/app/data
|
|
--log-level=info
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9630/v1/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
start_period: 60s
|
|
retries: 3
|
|
|
|
# Node 2-5 with bootstrap connection
|
|
mainnet-node-2:
|
|
<<: *node-common
|
|
container_name: mainnet-node-2
|
|
volumes:
|
|
- mainnet-node-2-data:/app/data
|
|
- ~/.lux/keys/node2:/app/keys:ro
|
|
- ../genesis/configs/mainnet:/app/genesis:ro
|
|
ports:
|
|
- "9632:9630"
|
|
- "9633:9631"
|
|
command: >
|
|
--network-id=1
|
|
--http-host=0.0.0.0
|
|
--http-port=9630
|
|
--staking-port=9631
|
|
--network-allow-private-ips=true
|
|
--genesis-file=/app/genesis/genesis.json
|
|
--staking-tls-cert-file=/app/keys/staking/staker.crt
|
|
--staking-tls-key-file=/app/keys/staking/staker.key
|
|
--staking-signer-key-file=/app/keys/bls/signer.key
|
|
--bootstrap-ips=mainnet-node-1:9631
|
|
--bootstrap-ids=NodeID-FrtEjhat6RUqjEWCJgYZKqBaxY2Woyy5G
|
|
--data-dir=/app/data
|
|
--log-level=info
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
|
|
mainnet-node-3:
|
|
<<: *node-common
|
|
container_name: mainnet-node-3
|
|
volumes:
|
|
- mainnet-node-3-data:/app/data
|
|
- ~/.lux/keys/node3:/app/keys:ro
|
|
- ../genesis/configs/mainnet:/app/genesis:ro
|
|
ports:
|
|
- "9634:9630"
|
|
- "9635:9631"
|
|
command: >
|
|
--network-id=1
|
|
--http-host=0.0.0.0
|
|
--http-port=9630
|
|
--staking-port=9631
|
|
--network-allow-private-ips=true
|
|
--genesis-file=/app/genesis/genesis.json
|
|
--staking-tls-cert-file=/app/keys/staking/staker.crt
|
|
--staking-tls-key-file=/app/keys/staking/staker.key
|
|
--staking-signer-key-file=/app/keys/bls/signer.key
|
|
--bootstrap-ips=mainnet-node-1:9631
|
|
--bootstrap-ids=NodeID-FrtEjhat6RUqjEWCJgYZKqBaxY2Woyy5G
|
|
--data-dir=/app/data
|
|
--log-level=info
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
|
|
mainnet-node-4:
|
|
<<: *node-common
|
|
container_name: mainnet-node-4
|
|
volumes:
|
|
- mainnet-node-4-data:/app/data
|
|
- ~/.lux/keys/node4:/app/keys:ro
|
|
- ../genesis/configs/mainnet:/app/genesis:ro
|
|
ports:
|
|
- "9636:9630"
|
|
- "9637:9631"
|
|
command: >
|
|
--network-id=1
|
|
--http-host=0.0.0.0
|
|
--http-port=9630
|
|
--staking-port=9631
|
|
--network-allow-private-ips=true
|
|
--genesis-file=/app/genesis/genesis.json
|
|
--staking-tls-cert-file=/app/keys/staking/staker.crt
|
|
--staking-tls-key-file=/app/keys/staking/staker.key
|
|
--staking-signer-key-file=/app/keys/bls/signer.key
|
|
--bootstrap-ips=mainnet-node-1:9631
|
|
--bootstrap-ids=NodeID-FrtEjhat6RUqjEWCJgYZKqBaxY2Woyy5G
|
|
--data-dir=/app/data
|
|
--log-level=info
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
|
|
mainnet-node-5:
|
|
<<: *node-common
|
|
container_name: mainnet-node-5
|
|
volumes:
|
|
- mainnet-node-5-data:/app/data
|
|
- ~/.lux/keys/node5:/app/keys:ro
|
|
- ../genesis/configs/mainnet:/app/genesis:ro
|
|
ports:
|
|
- "9638:9630"
|
|
- "9639:9631"
|
|
command: >
|
|
--network-id=1
|
|
--http-host=0.0.0.0
|
|
--http-port=9630
|
|
--staking-port=9631
|
|
--network-allow-private-ips=true
|
|
--genesis-file=/app/genesis/genesis.json
|
|
--staking-tls-cert-file=/app/keys/staking/staker.crt
|
|
--staking-tls-key-file=/app/keys/staking/staker.key
|
|
--staking-signer-key-file=/app/keys/bls/signer.key
|
|
--bootstrap-ips=mainnet-node-1:9631
|
|
--bootstrap-ids=NodeID-FrtEjhat6RUqjEWCJgYZKqBaxY2Woyy5G
|
|
--data-dir=/app/data
|
|
--log-level=info
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
|
|
# LXD Gateway for DEX
|
|
mainnet-gateway:
|
|
build:
|
|
context: ../dex
|
|
dockerfile: Dockerfile
|
|
image: lxd-gateway:mainnet
|
|
container_name: mainnet-gateway
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
LUX_RPC_URL: http://mainnet-node-1:9630/v1/chain/C/rpc
|
|
ZOO_RPC_URL: http://mainnet-node-1:9630/v1/chain/zoo/rpc
|
|
LOG_LEVEL: info
|
|
networks:
|
|
- mainnet
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# ===========================================================================
|
|
# BLOCK EXPLORERS (profile: explorers)
|
|
# ===========================================================================
|
|
|
|
x-explorer-common: &explorer-common
|
|
image: ghcr.io/luxfi/explorer:0.1.0
|
|
restart: unless-stopped
|
|
profiles:
|
|
- explorers
|
|
command: sh -c "bin/blockscout eval 'Elixir.Explorer.ReleaseTasks.create_and_migrate()' && bin/blockscout start"
|
|
networks:
|
|
- mainnet
|
|
depends_on:
|
|
mainnet-node-1:
|
|
condition: service_healthy
|
|
mainnet-postgres:
|
|
condition: service_healthy
|
|
|
|
mainnet-explorer-lux:
|
|
<<: *explorer-common
|
|
container_name: mainnet-explorer-lux
|
|
environment:
|
|
ETHEREUM_JSONRPC_VARIANT: geth
|
|
ETHEREUM_JSONRPC_HTTP_URL: http://mainnet-node-1:9630/v1/chain/C/rpc
|
|
ETHEREUM_JSONRPC_WS_URL: ws://mainnet-node-1:9630/v1/chain/C/ws
|
|
DATABASE_URL: postgresql://postgres:postgres@mainnet-postgres:5432/explorer_lux
|
|
NETWORK: LUX
|
|
SUBNETWORK: Mainnet
|
|
COIN: LUX
|
|
CHAIN_ID: 96369
|
|
DISABLE_EXCHANGE_RATES: "true"
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change-me-in-production}
|
|
ports:
|
|
- "4010:4000"
|
|
|
|
mainnet-explorer-zoo:
|
|
<<: *explorer-common
|
|
container_name: mainnet-explorer-zoo
|
|
environment:
|
|
ETHEREUM_JSONRPC_VARIANT: geth
|
|
ETHEREUM_JSONRPC_HTTP_URL: http://mainnet-node-1:9630/v1/chain/zoo/rpc
|
|
DATABASE_URL: postgresql://postgres:postgres@mainnet-postgres:5432/explorer_zoo
|
|
NETWORK: ZOO
|
|
SUBNETWORK: Mainnet
|
|
COIN: ZOO
|
|
CHAIN_ID: 200200
|
|
DISABLE_EXCHANGE_RATES: "true"
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change-me-in-production}
|
|
ports:
|
|
- "4011:4000"
|
|
|
|
mainnet-explorer-hanzo:
|
|
<<: *explorer-common
|
|
container_name: mainnet-explorer-hanzo
|
|
environment:
|
|
ETHEREUM_JSONRPC_VARIANT: geth
|
|
ETHEREUM_JSONRPC_HTTP_URL: http://mainnet-node-1:9630/v1/chain/hanzo/rpc
|
|
DATABASE_URL: postgresql://postgres:postgres@mainnet-postgres:5432/explorer_hanzo
|
|
NETWORK: HANZO
|
|
SUBNETWORK: AI Network
|
|
COIN: AI
|
|
CHAIN_ID: 36963
|
|
DISABLE_EXCHANGE_RATES: "true"
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change-me-in-production}
|
|
ports:
|
|
- "4012:4000"
|
|
|
|
mainnet-explorer-spc:
|
|
<<: *explorer-common
|
|
container_name: mainnet-explorer-spc
|
|
environment:
|
|
ETHEREUM_JSONRPC_VARIANT: geth
|
|
ETHEREUM_JSONRPC_HTTP_URL: http://mainnet-node-1:9630/v1/chain/spc/rpc
|
|
DATABASE_URL: postgresql://postgres:postgres@mainnet-postgres:5432/explorer_spc
|
|
NETWORK: SPC
|
|
SUBNETWORK: Sparkle Pony Club
|
|
COIN: SPC
|
|
CHAIN_ID: 36911
|
|
DISABLE_EXCHANGE_RATES: "true"
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-change-me-in-production}
|
|
ports:
|
|
- "4013:4000"
|