services:
  btcpayserver:
    image: btcpayserver/btcpayserver:2.2.0
    container_name: btcpayserver
    restart: unless-stopped
    ports:
      - "49392:49392"
    environment:
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=BTCPay2024SecurePassword123!
      - POSTGRES_DB=btcpayserver
      - BTCPAY_HOST=pay.silverlabs.uk
      - BTCPAY_PROTOCOL=https
      - BTCPAY_BIND=0.0.0.0:49392
      - BTCPAY_NETWORK=testnet
      - BTCPAY_CHAINS=btc
      - BTCPAY_BTCEXPLORERURL=http://nbxplorer:32838
      - BTCPAY_ROOTPATH=/
    volumes:
      - btcpay_datadir:/datadir
    networks:
      - btcpaynetwork
    depends_on:
      - postgres
      - nbxplorer

  postgres:
    image: postgres:13
    container_name: btcpay-postgres
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=BTCPay2024SecurePassword123!
      - POSTGRES_DB=btcpayserver
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - btcpaynetwork

  nbxplorer:
    image: nicolasdorier/nbxplorer:2.5.30
    container_name: btcpay-nbxplorer
    restart: unless-stopped
    ports:
      - "32838:32838"
    environment:
      - NBXPLORER_NETWORK=testnet
      - NBXPLORER_CHAINS=btc
      - NBXPLORER_BTCRPCURL=http://bitcoind:18332
      - NBXPLORER_BTCRPCUSER=bitcoinrpc
      - NBXPLORER_BTCRPCPASSWORD=BitcoinRPC2024SecurePassword456!
      - NBXPLORER_BIND=0.0.0.0:32838
      - NBXPLORER_NOAUTH=1
    volumes:
      - nbxplorer_data:/datadir
    networks:
      - btcpaynetwork
    depends_on:
      - bitcoind

  bitcoind:
    image: btcpayserver/bitcoin:26.0
    container_name: btcpay-bitcoind
    restart: unless-stopped
    environment:
      - BITCOIN_NETWORK=testnet
    volumes:
      - bitcoin_data:/data
    networks:
      - btcpaynetwork
    ports:
      - "18333:18333"
      - "18332:18332"

volumes:
  btcpay_datadir:
  postgres_data:
  nbxplorer_data:
  bitcoin_data:

networks:
  btcpaynetwork: