services:

  orthanc-a:
    image: ${ORTHANC_IMAGE_UNDER_TESTS:-orthancteam/orthanc:latest}
    container_name: orthanc-a
    restart: unless-stopped
    ports: ["8072:8042"]
    volumes: ["storage-orthanc-a:/var/lib/orthanc/db"]
    environment:
      VERBOSE_STARTUP: "true"
      VERBOSE_ENABLED: "true"
      ORTHANC_JSON: |
        {
          "AuthenticationEnabled": false,
          "DicomAet": "ORTHANCA",
          "Name": "Orthanc A",
          "OverwriteInstances": true,
          
          "DicomModalities": {
            "b": {
              "AET": "ORTHANCB",
              "Port": 4242,
              "Host": "orthanc-b"
            },
            "b-move": {
              "AET": "ORTHANCB",
              "Port": 4242,
              "Host": "orthanc-b",
              "RetrieveMethod": "C-MOVE"
            },
            "b-get": {
              "AET": "ORTHANCB",
              "Port": 4242,
              "Host": "orthanc-b",
              "RetrieveMethod": "C-GET"
            },
            "b-with-local-aet-not-declared": {
              "AET": "ORTHANCB",
              "Port": 4242,
              "Host": "orthanc-b",
              "LocalAet": "FROM-CONFIG"
            }
          }
        }


  orthanc-b:
    # last version before C-GET SCU
    image: orthancteam/orthanc:24.12.0
    container_name: orthanc-b
    restart: unless-stopped
    ports: ["8073:8042"]
    volumes: ["storage-orthanc-b:/var/lib/orthanc/db"]
    environment:
      VERBOSE_STARTUP: "true"
      VERBOSE_ENABLED: "true"
      ORTHANC_JSON: |
        {
          "AuthenticationEnabled": false,
          "DicomAet": "ORTHANCB",
          "Name": "Orthanc B",
          "OverwriteInstances": true,
          
          "DicomModalities": {
            "a": {
              "AET": "ORTHANCA",
              "Port": 4242,
              "Host": "orthanc-a"
            }
          }
        }

volumes:
  storage-orthanc-a:
  storage-orthanc-b:
