version: '3.9'

services:
  nats:
    image: nats
    ports:
      - '4222:4222' #Nats server port
      - '8222:8222' #Nats server Monitoring port
    command: [
      "--config", "nats-server.conf",
      "--debug",
      "--trace",
      "--user", "nats_user",
      "--pass", "Rw+dYIymAQm9H6ELLNwSuGo1812jqQ=="
    ]

  ssi:
    build:
      args:
        - SERVICE=ssi-abstraction
    init: true
    ports:
      - '3009:3009'
      - '3010:3010'
      - '4000:4000'
    environment:
      NATS_URL: nats://nats:4222
      PORT: 3009
      AGENT_NAME: ssi-abstraction-agent
      AGENT_WALLET_ID: ssi-wallet-id
      AGENT_WALLET_KEY: ssi-wallet-key
      AGENT_HOST: http://ssi
      AGENT_PUBLIC_DID_SEED: 6b8b882e2618fa5d45ee7229ca000000
      AGENT_AUTO_ACCEPT_CONNECTION: true
      AGENT_AUTO_ACCEPT_CREDENTIAL: contentApproved
      AGENT_LEDGER_ID: BCOVRIN_TEST
    depends_on:
      - nats

  schema-manager:
    build:
      args:
        - SERVICE=schema-manager
    init: true
    environment:
      - HTTP_PORT=3000
      - NATS_URL=nats://nats:4222
      - NATS_USER=nats_user
      - NATS_PASSWORD=Rw+dYIymAQm9H6ELLNwSuGo1812jqQ==
      - NATS_MONITORING_URL=http://nats:8222
      - SSI_AGENT_URL=http://ssi:3009
    ports:
      - '4001:3000'
    depends_on:
      - nats
      - ssi

  connection-manager:
    build:
      args:
        - SERVICE=connection-manager
    init: true
    environment:
      - HTTP_PORT=3000
      - NATS_URL=nats://nats:4222
      - NATS_MONITORING_URL=http://nats:8222
      - SSI_AGENT_URL=http://ssi:3009
    ports:
      - '4002:3000'
    depends_on:
      - nats
      - ssi

  credential-manager:
    build:
      args:
        - SERVICE=credential-manager
    init: true
    environment:
      - HTTP_HOST=0.0.0.0
      - HTTP_PORT=3000
      - NATS_URL=nats://nats:4222
      - NATS_MONITORING_URL=http://nats:8222
      - SSI_AGENT_URL=http://ssi:3009
    ports:
      - '4003:3000'
    depends_on:
      - nats
      - ssi

  # proof-manager:
  #   build:
  #     args:
  #       - SERVICE=proof-manager
  #   init: true
  #   environment:
  #     - HTTP_HOST=0.0.0.0
  #     - HTTP_PORT=3000
  #     - NATS_URL=nats://nats:4222
  #     - NATS_MONITORING_URL=http://nats:8222
  #     - SSI_AGENT_URL=http://ssi:3000
  #   ports:
  #     - '4004:3000'
  #   depends_on:
  #     - nats
  #     - ssi
