docker-compose.musiquay-lab.yml raw

   1  # Musiquay lab: a networked relay + Blossom host + Cashu mint + buyer.
   2  #
   3  #   docker compose -f docker-compose.musiquay-lab.yml up --build \
   4  #       --abort-on-container-exit --exit-code-from lab
   5  #
   6  # The lab container publishes a priced track, checks 401/402, mints real ecash
   7  # from the mint, sends an order over NIP-59, runs the seller service in-process,
   8  # receives the signed deed, downloads with a 22243 proof, and verifies the
   9  # receipt.
  10  #
  11  # The keys below are test-only. Never use them outside this lab.
  12  
  13  name: musiquay-lab
  14  
  15  services:
  16    mint:
  17      build:
  18        context: ../gonuts
  19        dockerfile: Dockerfile
  20      # The mint's main() requires a .env file to exist even when every setting
  21      # comes from the environment.
  22      entrypoint: ["/bin/sh", "-c"]
  23      command: ["touch /.env && exec /main"]
  24      environment:
  25        - LIGHTNING_BACKEND=FAKEBACKEND
  26        - MINT_PORT=3338
  27        - MINT_DB_PATH=/data/mint
  28        - MINT_NAME=Musiquay Lab Mint
  29        - INPUT_FEE_PPK=0
  30        - LOG=info
  31      volumes:
  32        - mint-data:/data
  33      healthcheck:
  34        test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:3338/v1/keys"]
  35        interval: 3s
  36        timeout: 3s
  37        retries: 40
  38  
  39    relay:
  40      build:
  41        context: .
  42        dockerfile: Dockerfile
  43      command: ["relay"]
  44      environment:
  45        - ORLY_PORT=3334
  46        - ORLY_DATA_DIR=/data
  47        - ORLY_LOG_LEVEL=info
  48        - ORLY_BLOSSOM_ENABLED=true
  49        - ORLY_AUTH_REQUIRED=false
  50        # The gate and receipts are opt-in.
  51        - ORLY_MUSIQUAY_HOST=relay:3334
  52        - ORLY_MUSIQUAY_KEY_DIR=/data/keys
  53      volumes:
  54        - relay-data:/data
  55      ports:
  56        - "13334:3334"
  57      healthcheck:
  58        test: ["CMD", "curl", "-f", "http://localhost:3334/"]
  59        interval: 3s
  60        timeout: 3s
  61        retries: 40
  62  
  63    lab:
  64      build:
  65        context: .
  66        dockerfile: Dockerfile
  67      depends_on:
  68        relay:
  69          condition: service_healthy
  70        mint:
  71          condition: service_healthy
  72      restart: "no"
  73      entrypoint: ["/app/orly"]
  74      command:
  75        - conformance
  76        - lab
  77        - --relay=ws://relay:3334
  78        - --blossom=http://relay:3334/blossom
  79        - --mint=http://mint:3338
  80        - --seller-nsec=1111111111111111111111111111111111111111111111111111111111111111
  81        - --buyer-nsec=2222222222222222222222222222222222222222222222222222222222222222
  82        - --price=5
  83        - --server=relay:3334
  84        - --timeout=120s
  85  
  86  volumes:
  87    mint-data:
  88    relay-data:
  89