/ compose.yml
compose.yml
  1  # compose file that run:
  2  # - bitcoin core node
  3  # - LND lightng network node
  4  # - nutshell cashu mint
  5  #
  6  # prerequisites:
  7  #     - docker or podman with compose already installed and working
  8  # knowledge prerequisites:
  9  #     - basic of linux administration
 10  #     - basic of onion network working logic
 11  #     - basic of bitcoin blockchain working logic
 12  #     - basic of lighting network working logic
 13  #     - basic of cashu working logic 
 14  #
 15  #  lnd requires bitcoin synch up > lnd require channels to work > cashu mint requires lnd node
 16  # 
 17  #
 18  # needs following dir structure at the same level of compose.yml script:
 19  #
 20  # mkdir -p ./data/ip2d-vol/data
 21  # mkdir -p ./data/bitcoin-vol/data
 22  # mkdir -p ./data/tor-services
 23  # mkdir -p ./data/lnd-vol/data
 24  # mkdir -p ./data/cashu/mint/data
 25  #
 26  # template rendering and vars init:
 27  #   ./build.sh
 28  #
 29  # don't be fool!!
 30  # change tor and bitcoin rpc default password
 31  # change cashu mint private key
 32  #
 33  #
 34  # services start
 35  # docker compose up -d
 36  #
 37  # services down
 38  # docker compose down 
 39  #
 40  services:
 41    tor_node:
 42      container_name: bitcoinbundle_tor
 43      restart: on-failure
 44      image: "lncm/tor"
 45      user: root
 46      environment:
 47         HOME: "/tmp"
 48      volumes:
 49        - ./data/tor-services:/data:z
 50        - ./torrc:/etc/tor/torrc:z
 51      networks:
 52         bitcoin_bundle:
 53           ipv4_address: 192.168.21.8
 54  
 55        
 56    i2pd_node:
 57       container_name: bitcoinbundle_i2pd
 58       restart: on-failure
 59       image: "purplei2p/i2pd"
 60       user: root
 61       command: "--sam.enabled=true --sam.address=0.0.0.0 --sam.port=7656 --loglevel=error"
 62       volumes:
 63         - ./data/ip2d-vol/data:/home/i2pd/data:z
 64       networks:
 65         bitcoin_bundle:
 66           ipv4_address: 192.168.21.9
 67  
 68    bitcoin_node:     
 69       container_name: bitcoinbundle_bitcoin_core
 70       restart: unless-stopped
 71       stop_grace_period: 15m30s
 72       image: bitcoin/bitcoin:27
 73       volumes:
 74        - ./data/bitcoin-vol/data:/home/bitcoin/.bitcoin:z
 75        - ./bitcoin.conf:/data/.bitcoin/bitcoin.conf:ro
 76       ports:
 77         - 8332:8332
 78         - 8333:8333
 79       networks:
 80         bitcoin_bundle:
 81           ipv4_address: 192.168.21.10
 82        
 83    lnd:
 84       container_name: bitcoinbundle_lnd
 85       image: "lightninglabs/lnd:v0.18.1-beta"
 86       user: 1000:1000
 87       restart: unless-stopped
 88       command: "--configfile=/data/.lnd/lnd.conf"
 89       volumes:
 90         - ./data/lnd-vol/data:/data/.lnd:z
 91         - ./lnd.conf:/data/.lnd/lnd.conf:ro
 92         - ./lnd-secret:/data/.lnd/lnd-secret:ro
 93       ports:
 94         - 9735:9335
 95         - 10009:10009
 96         - 8080:8080
 97       environment:
 98         HOME: "/data"
 99       networks:
100         bitcoin_bundle:
101           ipv4_address: 192.168.21.11
102         
103     
104    mint:
105      image: "cashubtc/nutshell:0.15.3"
106      container_name: bitcoinbundle_nutshell
107      ports:
108        - "3338:3338"
109      command: ["poetry", "run", "mint"]
110      volumes:
111        - ./data/cashu/mint/data:/data/mint
112        - ./data/lnd-vol/data:/lnd:ro
113      environment:
114        - DEBUG=TRUE
115          #- LOG_LEVEL=TRACE
116        - MINT_BACKEND_BOLT11_SAT=LndRestWallet
117        - MINT_LND_REST_ENDPOINT=https://bitcoinbundle_lnd:8080
118        - MINT_LND_REST_CERT="/lnd/tls.cert"
119        - MINT_LND_REST_CERT_VERIFY=False
120        - MINT_LND_REST_MACAROON=/lnd/data/chain/bitcoin/mainnet/admin.macaroon
121        # Mint information
122        - MINT_INFO_NAME="Your own Mint"
123        - MINT_INFO_DESCRIPTION="Describe your Mint"
124        - MINT_INFO_DESCRIPTION_LONG="Describe your Mint"
125        #- MINT_INFO_CONTACT=[["email","contact@me.com"], ["twitter","@me"], ["nostr",  "npub..."]]
126        - MINT_INFO_MOTD="Welcome Frens!"
127        - TOR=FALSE
128        - SOCKS_PROXY=socks5://cashu_tor:9050
129        - MINT_LISTEN_HOST=0.0.0.0
130        - MINT_LISTEN_PORT=3338
131        - MINT_PRIVATE_KEY=CHANGEME
132        - MINT_DATABASE=/data/mint
133        # fee to reserve in percent of the amount
134        - LIGHTNING_FEE_PERCENT=1.0
135        # minimum fee to reserve
136        - LIGHTNING_RESERVE_FEE_MIN=2000
137        # limits
138        # Max mint balance in satoshis
139        - MINT_MAX_BALANCE=200000
140        # Max peg-in amount in satoshis
141        - MINT_MAX_PEG_IN=50000
142        # Max peg-out amount in satoshis
143        - MINT_MAX_PEG_OUT=50000
144        # Use to allow only peg-out to LN
145        - MINT_PEG_OUT_ONLY=FALSE
146      networks:
147         bitcoin_bundle:
148           ipv4_address: 192.168.21.10
149  
150  networks:
151    bitcoin_bundle:
152      name: bitcoin_bundle
153      #internal: false
154      driver: bridge
155      ipam:
156        config:
157          - subnet: 192.168.21.0/24
158