version: "3"

services:

  nbxplorer:
    restart: unless-stopped
    image: nicolasdorier/nbxplorer:2.4.0
    expose:
      - "32838"
    environment:
      NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
      NBXPLORER_BIND: 0.0.0.0:32838
      NBXPLORER_TRIMEVENTS: 10000
      NBXPLORER_SIGNALFILESDIR: /datadir
      NBXPLORER_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorer${NBITCOIN_NETWORK:-regtest}
      NBXPLORER_AUTOMIGRATE: 1
      NBXPLORER_NOMIGRATEEVTS: 1
    links:
      - postgres
    volumes:
      - "nbxplorer_datadir:/datadir"

volumes:
  nbxplorer_datadir:
