<%#
 Copyright 2013-2017 the original author or authors from the JBooter project.

 This file is part of the JBooter project, see https://jbooter.github.io/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
version: '2'
services:
<%_ for(let i = 0; i < appConfigs.length; i++) { _%>
<%- appsYaml[i] %>
<%_ } _%>
<%_ if (useKafka) { _%>
    zookeeper:
        extends:
            file: kafka.yml
            service: zookeeper
    kafka:
        extends:
            file: kafka.yml
            service: kafka
<%_ } _%>
<%_ if (serviceDiscoveryType == 'eureka') { _%>
    jbooter-registry:
        extends:
            file: jbooter-registry.yml
            service: jbooter-registry
<%_ } _%>
<%_ if (serviceDiscoveryType == 'consul') { _%>
    consul:
        extends:
            file: consul.yml
            service: consul
    consul-config-loader:
        extends:
            file: consul.yml
            service: consul-config-loader
<%_ } _%>
<%_ if (monitoring === 'elk') { _%>

    jbooter-elasticsearch:
        extends:
            file: jbooter-console.yml
            service: jbooter-elasticsearch
    jbooter-logstash:
        extends:
          file: jbooter-console.yml
          service: jbooter-logstash
    jbooter-console:
        extends:
            file: jbooter-console.yml
            service: jbooter-console
    <%_ if (composeApplicationType === 'microservice') { _%>
    jbooter-zipkin:
        extends:
            file: jbooter-console.yml
            service: jbooter-zipkin
    <%_ } _%>
<%_ } _%>
<%_ if (monitoring === 'prometheus') { _%>

    prometheus:
        extends:
            file: prometheus.yml
            service: prometheus

    alertmanager:
        extends:
            file: prometheus.yml
            service: alertmanager

    grafana:
        extends:
            file: prometheus.yml
            service: grafana

volumes:
    prometheus_data: {}
    grafana_data: {}
<%_ } _%>
