version: '3'
services:
   haystack_agent:
    image: expediadotcom/haystack-agent:0.1.3
    depends_on:
    - zookeeper
    - kafkasvc
    environment:
      haystack_env_agents_spans_port: 35000
      haystack_env_agents_spans_dispatchers_kafka_bootstrap_servers: "kafkasvc:9092"
    ports:
    - "35000:35000"
    entrypoint:
    - /bin/sh
    - -c
    - 'sleep 10 && java -jar /app/bin/haystack-agent.jar --config-provider file --file-path /app/bin/dev.conf'
   haystack_collector:
    image: expediadotcom/haystack-http-span-collector:1.1
    depends_on:
    - zookeeper
    - kafkasvc
    environment:
      HAYSTACK_PROP_KAFKA_PRODUCER_PROPS_BOOTSTRAP_SERVERS: "kafkasvc:9092"
    ports:
    - "8080:8080"
   zookeeper:
    image: wurstmeister/zookeeper
    ports:
    - "2181:2181"
   kafkasvc:
     image: wurstmeister/kafka:2.11-1.1.1
     depends_on:
     - zookeeper
     environment:
       KAFKA_ADVERTISED_HOST_NAME: "kafkasvc"
       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 
     volumes:
     - /var/run/docker.sock:/var/run/docker.sock
     ports:
     - "9092:9092"
