version: '2'

services:
    crossdock:
        image: crossdock/crossdock
        links:
            - test_driver
            - go
            - node
            - java
            - python
            - zipkin-brave-thrift
            - zipkin-brave-json
            - zipkin-brave-json-v2
            - zipkin-brave-proto

        environment:
            - WAIT_FOR=test_driver,go,node,java,python,zipkin-brave-thrift,zipkin-brave-json,zipkin-brave-json-v2,zipkin-brave-proto
            - WAIT_FOR_TIMEOUT=240s

            - CALL_TIMEOUT=60s

            - AXIS_CLIENT=test_driver
            - AXIS_SERVICES=go,node,java,python,zipkin-brave-thrift,zipkin-brave-json,zipkin-brave-json-v2,zipkin-brave-proto

            - BEHAVIOR_ENDTOEND=client,services

    go:
        image: jaegertracing/xdock-go
        ports:
            - "8080-8082"

    node:
        image: jaegertracing/xdock-node
        ports:
            - "8080-8082"

    java:
        image: jaegertracing/xdock-java
        ports:
            - "8080-8082"
        depends_on:
#        UDP sender needs to know agent's address
            - jaeger-agent

    python:
        image: jaegertracing/xdock-py
        ports:
            - "8080-8082"

    zipkin-brave-thrift:
        image: jaegertracing/xdock-zipkin-brave
        ports:
            - "8080-8081"
        environment:
            - ENCODING=THRIFT

    zipkin-brave-json:
        image: jaegertracing/xdock-zipkin-brave
        ports:
            - "8080-8081"
        environment:
            - ENCODING=JSON

    zipkin-brave-json-v2:
        image: jaegertracing/xdock-zipkin-brave
        ports:
            - "8080-8081"
        environment:
            - ENCODING=JSON
            - JSON_ENCODER=JSON_V2

    zipkin-brave-proto:
        image: jaegertracing/xdock-zipkin-brave
        ports:
            - "8080-8081"
        environment:
            - ENCODING=PROTO
            - JSON_ENCODER=PROTO3

    test_driver:
        image: jaegertracing/test-driver
        ports:
            - "8080"
        environment:
            - JAEGER_COLLECTOR_HC_HOST_PORT=jaeger-collector:${JAEGER_COLLECTOR_HC_PORT}
        depends_on:
            - jaeger-query
            - jaeger-collector
            - jaeger-agent
