203 lines
4.7 KiB
YAML
203 lines
4.7 KiB
YAML
# Lethean Full Ecosystem
|
|
# Chain node + wallet + explorer + trade + pool + LNS + docs
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.ecosystem.yml up -d
|
|
#
|
|
# URLs after startup:
|
|
# Explorer: http://localhost:3335
|
|
# Trade: http://localhost:3337
|
|
# Trade API: http://localhost:3336
|
|
# Pool API: http://localhost:2117
|
|
# Pool Web: http://localhost:8888
|
|
# LNS HTTP: http://localhost:5553
|
|
# LNS DNS: localhost:5354
|
|
# Docs: http://localhost:8098
|
|
# Daemon RPC: http://localhost:46941
|
|
# Wallet RPC: http://localhost:46944
|
|
|
|
services:
|
|
# --- Chain ---
|
|
daemon:
|
|
build:
|
|
context: ..
|
|
dockerfile: utils/docker/lthn-chain/Dockerfile
|
|
target: chain-service
|
|
args:
|
|
BUILD_TESTNET: 1
|
|
BUILD_THREADS: 4
|
|
container_name: lthn-daemon
|
|
ports:
|
|
- "46941:36941"
|
|
- "46942:36942"
|
|
volumes:
|
|
- daemon-data:/data
|
|
command: >
|
|
lethean-chain-node
|
|
--data-dir /data
|
|
--rpc-bind-ip 0.0.0.0
|
|
--rpc-bind-port 36941
|
|
--p2p-bind-port 36942
|
|
--rpc-enable-admin-api
|
|
--allow-local-ip
|
|
--log-level 1
|
|
--disable-upnp
|
|
|
|
wallet:
|
|
build:
|
|
context: ..
|
|
dockerfile: utils/docker/lthn-chain/Dockerfile
|
|
target: chain-service
|
|
args:
|
|
BUILD_TESTNET: 1
|
|
BUILD_THREADS: 4
|
|
container_name: lthn-wallet
|
|
ports:
|
|
- "46944:36944"
|
|
volumes:
|
|
- wallet-data:/wallet
|
|
entrypoint: >
|
|
sh -c "
|
|
if [ ! -f /wallet/main.wallet ]; then
|
|
echo '' | lethean-wallet-cli --generate-new-wallet /wallet/main.wallet --password '' --daemon-address daemon:36941 --command exit;
|
|
fi;
|
|
lethean-wallet-cli
|
|
--wallet-file /wallet/main.wallet
|
|
--password ''
|
|
--daemon-address daemon:36941
|
|
--rpc-bind-port 36944
|
|
--rpc-bind-ip 0.0.0.0
|
|
--do-pos-mining
|
|
"
|
|
depends_on:
|
|
- daemon
|
|
|
|
# --- Explorer ---
|
|
explorer-db:
|
|
image: postgres:16-alpine
|
|
container_name: lthn-explorer-db
|
|
environment:
|
|
POSTGRES_USER: explorer
|
|
POSTGRES_PASSWORD: explorer
|
|
POSTGRES_DB: lethean_explorer
|
|
volumes:
|
|
- explorer-db:/var/lib/postgresql/data
|
|
|
|
explorer:
|
|
build:
|
|
context: ../../zano-upstream/zano-explorer-zarcanum
|
|
container_name: lthn-explorer
|
|
ports:
|
|
- "3335:3335"
|
|
environment:
|
|
API: http://daemon:36941
|
|
FRONTEND_API: http://localhost:3335
|
|
SERVER_PORT: "3335"
|
|
AUDITABLE_WALLET_API: http://daemon:36941
|
|
PGUSER: explorer
|
|
PGPASSWORD: explorer
|
|
PGDATABASE: lethean_explorer
|
|
PGHOST: explorer-db
|
|
PGPORT: "5432"
|
|
MEXC_API_URL: ""
|
|
depends_on:
|
|
- daemon
|
|
- explorer-db
|
|
|
|
# --- Trade ---
|
|
trade-db:
|
|
image: postgres:16-alpine
|
|
container_name: lthn-trade-db
|
|
environment:
|
|
POSTGRES_USER: trade
|
|
POSTGRES_PASSWORD: trade
|
|
POSTGRES_DB: lethean_trade
|
|
volumes:
|
|
- trade-db:/var/lib/postgresql/data
|
|
|
|
trade-api:
|
|
build:
|
|
context: ../../zano-upstream/zano_trade_backend
|
|
container_name: lthn-trade-api
|
|
ports:
|
|
- "3336:3336"
|
|
environment:
|
|
PORT: "3336"
|
|
PGUSER: trade
|
|
PGPASSWORD: trade
|
|
PGDATABASE: lethean_trade
|
|
PGHOST: trade-db
|
|
PGPORT: "5432"
|
|
JWT_SECRET: testnet-dev-secret
|
|
DAEMON_RPC_URL: http://daemon:36941/json_rpc
|
|
depends_on:
|
|
- daemon
|
|
- trade-db
|
|
|
|
trade-frontend:
|
|
build:
|
|
context: ../../zano-upstream/zano_trade_frontend
|
|
container_name: lthn-trade-frontend
|
|
ports:
|
|
- "3337:30289"
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: http://trade-api:3336
|
|
depends_on:
|
|
- trade-api
|
|
|
|
# --- Mining Pool ---
|
|
pool-redis:
|
|
image: redis:7-alpine
|
|
container_name: lthn-pool-redis
|
|
restart: unless-stopped
|
|
|
|
pool:
|
|
build:
|
|
context: ../..
|
|
dockerfile: zano-upstream/zano-pool/Dockerfile
|
|
container_name: lthn-pool
|
|
ports:
|
|
- "5555:5555"
|
|
- "7777:7777"
|
|
- "2117:2117"
|
|
- "8888:8888"
|
|
volumes:
|
|
- ./pool-config.json:/pool/config.json:ro
|
|
depends_on:
|
|
- daemon
|
|
- wallet
|
|
- pool-redis
|
|
|
|
# --- LNS (Lethean Name Service) ---
|
|
lns:
|
|
build:
|
|
context: ../../lns
|
|
container_name: lthn-lns
|
|
ports:
|
|
- "5553:5553" # HTTP API
|
|
- "5354:5354/udp" # DNS
|
|
- "5354:5354/tcp" # DNS (TCP)
|
|
environment:
|
|
DAEMON_URL: http://daemon:36941
|
|
HSD_URL: http://host.docker.internal:14037
|
|
LNS_MODE: light
|
|
LNS_HTTP_PORT: "5553"
|
|
LNS_DNS_PORT: "5354"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
- daemon
|
|
|
|
# --- Docs ---
|
|
docs:
|
|
build:
|
|
context: ../../zano-upstream/zano-docs
|
|
container_name: lthn-docs
|
|
ports:
|
|
- "8098:80"
|
|
|
|
volumes:
|
|
daemon-data:
|
|
wallet-data:
|
|
explorer-db:
|
|
trade-db:
|