version: '3.3'
services:
    ace-kafka-connect:
      image: atexproducts/ace.kafka-connect:${ACE_VERSION}
      ports:
        - "8083:8083"
      secrets:
        - source: kafka-connect
          target: /opt/couch-kafka.json
      environment:
        - KAFKA_HEAP_OPTS=-Xmx256m
        - BOOTSTRAP_SERVERS=ace-kafka-1:9092,ace-kafka-2:9092,ace-kafka-3:9092
        - ZOOKEEPER=ace-zookeeper-1:2181,ace-zookeeper-2:2181,ace-zookeeper-3:2181,ace-zookeeper-4:2181,ace-zookeeper-5:2181

    ace-file-service:
      image: atexproducts/ace.file-service:${ACE_VERSION}
      ports:
        - "8082:8080"
      secrets:
        - source: token
          target: /opt/ace/token.properties
        - source: file-service
          target: /opt/ace/file-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx128m

    ace-content-service:
      image: atexproducts/ace.content-service-test:${ACE_VERSION}
      ports:
        - "8081:8080"
      secrets:
        - source: token
          target: /opt/ace/token.properties
        - source: content-service
          target: /opt/ace/content-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx2048m

    ace-indexer:
      image: atexproducts/ace.indexer:${ACE_VERSION}
      ports:
        - "8085:8080"
      secrets:
        - source: indexer
          target: /opt/ace/indexer.yml
        - source: token
          target: /opt/ace/token.properties
      environment:
        - ACE_JAVA_OPTS=-Xmx128m

    ace-reindexer:
      image: atexproducts/ace.indexer:${ACE_VERSION}
      ports:
        - "8085:8080"
      secrets:
        - source: reindexer
          target: /opt/ace/indexer.yml
        - source: token
          target: /opt/ace/token.properties
      environment:
        - ACE_JAVA_OPTS=-Xmx128m

    ace-search-service:
      image: atexproducts/ace.search-service:${ACE_VERSION}
      ports:
        - "8086:8080"
      secrets:
        - source: token
          target: /opt/ace/token.properties
        - source: search-service
          target: /opt/ace/search-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx128m

    ace-image-service:
      image: atexproducts/ace.image-service:${ACE_VERSION}
      ports:
        - "8084:8080"
      secrets:
        - source: token
          target: /opt/ace/token.properties
        - source: image-service
          target: /opt/ace/image-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx2048m

    ace-taxonomy-service:
      image: atexproducts/ace.taxonomy-service:${ACE_VERSION}
      ports:
        - "8087:8080"
      secrets:
        - source: token
          target: /opt/ace/token.properties
        - source: taxonomy-service
          target: /opt/ace/taxonomy-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx128m

    ace-file-delivery-service:
      image: atexproducts/ace.file-delivery-service:${ACE_VERSION}
      ports:
        - "8088:8080"
      configs:
        - source: file-delivery-service
          target: /opt/ace/file-delivery-service.yml
      environment:
        - ACE_JAVA_OPTS=-Xmx128m
secrets:
  token:
    file: ${CONFIG_DIR}/token.properties
  indexer:
    file: ${CONFIG_DIR}/indexer.yml
  reindexer:
    file: ${CONFIG_DIR}/reindexer.yml
  content-service:
    file: ${CONFIG_DIR}/content-service.yml
  search-service:
    file: ${CONFIG_DIR}/search-service.yml
  file-service:
    file: ${CONFIG_DIR}/file-service.yml
  image-service:
    file: ${CONFIG_DIR}/image-service.yml
  taxonomy-service:
    file: ${CONFIG_DIR}/taxonomy-service.yml
  kafka-connect:
    file: ${CONFIG_DIR}/couch-kafka.json
configs:
  file-delivery-service:
    file: ${CONFIG_DIR}/file-delivery-service.yml
