version: '2'
services:
    springbooter-registry:
        container_name: springbooter-registry
        image: <%= DOCKER_SPRINGBOOTER_REGISTRY %>
        volumes:
            - ./central-server-config:/central-config
        # By default the SpringBooter Registry runs with the "prod" and "native"
        # Spring profiles.
        # "native" profile means the filesystem is used to store data, see
        # http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html
        environment:
            - SPRING_PROFILES_ACTIVE=dev,native
            - SECURITY_USER_PASSWORD=<%= adminPassword %>
            <%_ if (monitoring === 'elk') { _%>
            - SPRINGBOOTER_LOGGING_LOGSTASH_ENABLED=true
            - SPRINGBOOTER_LOGGING_LOGSTASH_HOST=springbooter-logstash
            - SPRINGBOOTER_METRICS_LOGS_ENABLED=true
            - SPRINGBOOTER_METRICS_LOGS_REPORTFREQUENCY=60
            <%_ } _%>
            <%_ if (monitoring === 'prometheus') { _%>
            - SPRINGBOOTER_METRICS_PROMETHEUS_ENABLED=true
            - SPRINGBOOTER_METRICS_PROMETHEUS_ENDPOINT=/prometheusMetrics
            <%_ } _%>
            # - GIT_URI=https://github.com/springbooter/springbooter-registry/
            # - GIT_SEARCH_PATHS=central-config
        ports:
            - 8761:8761
