Ldk compose setup (#1242)

* remove ldk mint from default docker compose

* fix env var name for bitcoin network

* add otional vars as comment in compose.ldk-node

* better warning message and moved network definition to top
This commit is contained in:
gandlafbtc
2025-10-31 22:06:36 +09:00
committed by GitHub
parent fb07ec4b85
commit 0c21cb59c6
2 changed files with 17 additions and 38 deletions

View File

@@ -46,7 +46,7 @@ services:
container_name: mint-ldk-node
ports:
- "8085:8085"
- "8091:8091" # LDK admin dashboard
- "8091:8091" # LDK admin dashboard (WARNING!!! Do not expose to network! Doing so will leave LDK node funds accessible by whole network)
environment:
- CDK_MINTD_URL=https://example.com
- CDK_MINTD_LN_BACKEND=ldk-node
@@ -67,12 +67,27 @@ services:
- CDK_MINTD_PROMETHEUS_ADDRESS=0.0.0.0
- CDK_MINTD_PROMETHEUS_PORT=9000
# LDK Node specific configuration
- CDK_MINTD_LDK_NODE_NETWORK=testnet
- CDK_MINTD_LDK_NODE_BITCOIN_NETWORK=testnet # or: testnet, signet, regtest
- CDK_MINTD_LDK_NODE_ESPLORA_URL=https://blockstream.info/testnet/api
- CDK_MINTD_LDK_NODE_LISTENING_ADDRESSES=0.0.0.0:9735
# LDK admin dashboard config
- CDK_MINTD_LDK_NODE_WEBSERVER_HOST=0.0.0.0
# Other Options
# - CDK_MINTD_LDK_NODE_WEBSERVER_PORT=
# - CDK_MINTD_LDK_NODE_FEE_PERCENT=
# - CDK_MINTD_LDK_NODE_RESERVE_FEE_MIN=
# - CDK_MINTD_LDK_NODE_CHAIN_SOURCE_TYPE=esplora # or: bitcoinrpc
# if chain source is set to bitcoinrpc, the following RPC options need to be set instead
# - CDK_MINTD_LDK_NODE_BITCOIND_RPC_HOST=
# - CDK_MINTD_LDK_NODE_BITCOIND_RPC_PORT=
# - CDK_MINTD_LDK_NODE_BITCOIND_RPC_USER=
# - CDK_MINTD_LDK_NODE_BITCOIND_RPC_PASSWORD=
# - CDK_MINTD_LDK_NODE_STORAGE_DIR_PATH=
# - CDK_MINTD_LDK_NODE_LDK_NODE_HOST=
# - CDK_MINTD_LDK_NODE_LDK_NODE_PORT=
# - CDK_MINTD_LDK_NODE_GOSSIP_SOURCE_TYPE=rgs # or: p2p
# - CDK_MINTD_LDK_NODE_RGS_URL=
volumes:
# Persist LDK node data
- ldk_node_data:/usr/src/app/ldk_node_data

View File

@@ -74,42 +74,6 @@ services:
# depends_on:
# - postgres
# LDK Node mint service - enable with: docker-compose --profile ldk-node up
mintd-ldk-node:
build:
context: .
dockerfile: Dockerfile.ldk-node
container_name: mint-ldk-node
profiles:
- ldk-node
ports:
- "8086:8085" # Different port to avoid conflict with main mint
environment:
- CDK_MINTD_URL=https://example.com
- CDK_MINTD_LN_BACKEND=ldk-node
- CDK_MINTD_LISTEN_HOST=0.0.0.0
- CDK_MINTD_LISTEN_PORT=8085
- CDK_MINTD_MNEMONIC=
# Database configuration
- CDK_MINTD_DATABASE=sqlite
# Cache configuration
- CDK_MINTD_CACHE_BACKEND=memory
- CDK_MINTD_PROMETHEUS_ENABLED=true
- CDK_MINTD_PROMETHEUS_ADDRESS=0.0.0.0
- CDK_MINTD_PROMETHEUS_PORT=9000
# LDK Node specific configuration
- CDK_MINTD_LDK_NODE_NETWORK=testnet
- CDK_MINTD_LDK_NODE_ESPLORA_URL=https://blockstream.info/testnet/api
- CDK_MINTD_LDK_NODE_LISTENING_ADDRESSES=0.0.0.0:9735
volumes:
# Persist LDK node data
- ldk_node_data:/usr/src/app/ldk_node_data
command: ["cdk-mintd"]
depends_on:
- prometheus
- grafana
networks:
- cdk
# PostgreSQL database service
# Enable with: docker-compose --profile postgres up