services:
  btcpayserver:
    image: btcpayserver/btcpayserver:2.2.0
    container_name: btcpayserver
    restart: unless-stopped
    ports:
      - "49392:49392"
    environment:
      - BTCPAY_HOST=pay.silverlabs.uk
      - BTCPAY_BIND=0.0.0.0:49392
      - BTCPAY_NETWORK=testnet
      - BTCPAY_CHAINS=btc
      - BTCPAY_ROOTPATH=/
      - BTCPAY_BTCEXPLORERURL=http://dummy:1234
      - BTCPAY_BTCEXPLORERNOAUTH=1
      - BTCPAY_POSTGRES=User ID=btcpay;Host=postgres;Port=5432;Database=btcpayserver;Password=btcpay
    volumes:
      - btcpay_datadir:/datadir
    depends_on:
      - postgres

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

volumes:
  btcpay_datadir:
  postgres_data: