version: '3.3' services: otero_service_a: build: context: . dockerfile: Dockerfile command: - "go" - "run" - "-race" - "./..." - "-service" - "A" volumes: - ./:/src ports: - "8081:8081" - "8082:8082" networks: - teronet otero_service_b: build: context: . dockerfile: Dockerfile command: - "go" - "run" - "-race" - "./..." - "-service" - "B" volumes: - ./:/src networks: - teronet # ******************** # Telemetry Components # ******************** # Jaeger jaeger: image: jaegertracing/all-in-one:1.53.0 command: - "--config-file" - "/etc/jaeger-config.yaml" volumes: - ./confs/tls:/etc/tls - ./confs/jaeger-config.yaml:/etc/jaeger-config.yaml ports: # OTLP over gRPC receiver - "14317:4317" # OTLP over HTTP receiver - "14318:4318" # Web HTTP - "16686:16686" environment: - COLLECTOR_OTLP_ENABLED=true networks: - teronet # Prometheus prometheus: image: prom/prometheus:v2.48.1 container_name: prometheus command: - --web.console.templates=/etc/prometheus/consoles - --web.console.libraries=/etc/prometheus/console_libraries - --storage.tsdb.retention.time=1h - --config.file=/etc/prometheus/prometheus-config.yaml - --storage.tsdb.path=/prometheus - --web.enable-lifecycle - --web.route-prefix=/ volumes: - ./confs/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml ports: - "9090:9090" networks: - teronet # OpenTelemetry Collector otel_collector: image: otel/opentelemetry-collector-contrib:0.91.0 command: --config=/etc/otel-collector-config.yaml volumes: - ./confs/tls:/etc/tls - ./confs/otel-collector-config.yaml:/etc/otel-collector-config.yaml - ./confs/otel_file_exporter.json:/etc/otel_file_exporter.json # The official opentelemetry-collector-contrib container does not have a writable filesystem(its built from scratch docker image) # Hence, we need to add this file and make it writabe; `chmod 777 confs/file_exporter.json` # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter ports: - "4317:4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464:9464" # Prometheus exporter - "8888:8888" # metrics endpoint depends_on: - jaeger - prometheus networks: - teronet # We create a docker network and so that otero is able to access the other containers. networks: teronet: null