-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
106 lines (100 loc) · 2.69 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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