services:

  # jaeger
  front-envoy:
    build:
      context: .
      dockerfile: ../shared/envoy/Dockerfile
    depends_on:
      service1:
        condition: service_healthy
      service2:
        condition: service_healthy
      jaeger:
        condition: service_healthy
    ports:
    - "${PORT_PROXY:-10000}:8000"

  service1:
    build:
      context: ../shared/python
      target: aiohttp-tracing-service3
    volumes:
    - ./service1-envoy-jaeger.yaml:/etc/service-envoy.yaml
    environment:
    - SERVICE_NAME=1

  service2:
    build:
      context: ../shared/python
      target: aiohttp-tracing-service3
    volumes:
    - ./service2-envoy-jaeger.yaml:/etc/service-envoy.yaml
    environment:
    - SERVICE_NAME=2

  jaeger:
    build:
      context: .
      dockerfile: ../shared/jaeger/Dockerfile
    environment:
    - COLLECTOR_ZIPKIN_HOST_PORT=9411
    ports:
    - "${PORT_UI:-10000}:16686"
