#
# Copyright 2015-2020 The OpenZipkin Authors
#
# 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.
#

# This runs zipkin against an Amazon Elasticsearch Service
#
# Note that this file is meant for learning Zipkin, not production deployments.

version: '2.4'

services:
  zipkin:
    image: openzipkin/zipkin-aws
    container_name: zipkin
    environment:
      - STORAGE_TYPE=elasticsearch
      # This is an alternative to ES_HOSTS=https://search-zipkin-2rlyh66ibw43ftlk4342ceeewu.ap-southeast-1.es.amazonaws.com
      - ES_AWS_DOMAIN=zipkin
      # When ES backs up it doesn't always error, sometimes it will timeout
      - ES_TIMEOUT=20000
      # - ES_HTTP_LOGGING=HEADERS
    volumes:
      # Share your credentials with your docker image so it can access your Elasticsearch domain
      - ~/.aws:/zipkin/.aws:ro
    ports:
      # Port used for the Zipkin UI and HTTP Api
      - 9411:9411

  # disable storage as we're using the cloud!
  storage:
    image: hello-world
    container_name: storage-disabled
    logging:
      driver: none
