123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- version: '3.8'
- services:
- # CDK Mint service
- prometheus:
- image: prom/prometheus:latest
- ports:
- - "9090:9090"
- volumes:
- - ./misc/provisioning/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- command:
- - '--config.file=/etc/prometheus/prometheus.yml'
- - '--storage.tsdb.path=/prometheus'
- - '--web.console.libraries=/etc/prometheus/console_libraries'
- - '--web.console.templates=/etc/prometheus/consoles'
- - '--web.enable-lifecycle'
- - '--enable-feature=otlp-write-receiver'
- extra_hosts:
- - "host.docker.internal:host-gateway"
- networks:
- - cdk
- # Grafana for visualization
- grafana:
- image: grafana/grafana:latest
- ports:
- - "3011:3000"
- volumes:
- - ./misc/provisioning/datasources:/etc/grafana/provisioning/datasources
- - ./misc/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- environment:
- - GF_DASHBOARDS_JSON_ENABLED=true
- - GF_SECURITY_ADMIN_PASSWORD=admin
- - GF_PROVISIONING_PATHS=/etc/grafana/provisioning
- networks:
- - cdk
- mintd:
- build:
- context: .
- dockerfile: Dockerfile
- container_name: mint
- ports:
- - "8085:8085"
- environment:
- - CDK_MINTD_URL=https://example.com
- - CDK_MINTD_LN_BACKEND=fakewallet
- - CDK_MINTD_LISTEN_HOST=0.0.0.0
- - CDK_MINTD_LISTEN_PORT=8085
- - CDK_MINTD_MNEMONIC=
- # Database configuration - choose one:
- # Option 1: SQLite (embedded, no additional setup needed)
- - CDK_MINTD_DATABASE=sqlite
- # Option 2: ReDB (embedded, no additional setup needed)
- # - CDK_MINTD_DATABASE=redb
- # Option 3: PostgreSQL (requires postgres service, enable with: docker-compose --profile postgres up)
- # - CDK_MINTD_DATABASE=postgres
- # - CDK_MINTD_DATABASE_URL=postgresql://cdk_user:cdk_password@postgres:5432/cdk_mint
- # 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
- command: ["cdk-mintd"]
- depends_on:
- - prometheus
- - grafana
- networks:
- - cdk
- # Uncomment when using PostgreSQL:
- # 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
- # postgres:
- # image: postgres:16-alpine
- # container_name: mint_postgres
- # restart: unless-stopped
- # profiles:
- # - postgres
- # environment:
- # - POSTGRES_USER=cdk_user
- # - POSTGRES_PASSWORD=cdk_password
- # - POSTGRES_DB=cdk_mint
- # - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
- # ports:
- # - "5432:5432"
- # volumes:
- # - postgres_data:/var/lib/postgresql/data
- # healthcheck:
- # test: ["CMD-SHELL", "pg_isready -U cdk_user -d cdk_mint"]
- # interval: 10s
- # timeout: 5s
- # retries: 5
- volumes:
- postgres_data:
- driver: local
- ldk_node_data:
- driver: local
- networks:
- cdk:
- driver: bridge
|