Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (89 loc) · 2.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (89 loc) · 2.67 KB
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
version: '3.4'
services:
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268"
- "14250"
- "6831:6831"
zipkin:
image: openzipkin/zipkin
container_name: zipkin
ports:
- "9411:9411"
otel-collector:
image: otel/opentelemetry-collector:0.29.0
volumes:
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
command: ["--config=/etc/otel-collector-config.yml"]
ports:
- "1888:1888" # pprof extension
- "13133:13133" # health_check extension
- "4318:4318" # OTLP HTTP receiver
- "55670:55679" # zpages extension
depends_on:
- jaeger
- zipkin
zookeeper:
image: wurstmeister/zookeeper
hostname: zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
hostname: kafka
ports:
- "9092:9092"
- "9094:9094"
links:
- zookeeper
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: "9092"
KAFKA_CREATE_TOPICS: "AddWeatherForecastV1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
#HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
#HOSTNAME_COMMAND: curl http://169.254.169.254/latest/meta-data/public-hostname
HOSTNAME_COMMAND: "echo 127.0.0.1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://_{HOSTNAME_COMMAND}:9094
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
postgresql:
ports:
- "5431:5432"
restart: always
hostname: opentelemetry-postgresql
environment:
- POSTGRES_PASSWORD=guest
volumes:
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
image: 'postgres:11.12'
api1:
image: api1
build:
context: .
dockerfile: Api1.Dockerfile
ports:
- "5000:80"
- "5001:443"
depends_on:
- jaeger
- zipkin
- kafka
- postgresql
api2:
image: api2
build:
context: .
dockerfile: Api2.Dockerfile
ports:
- "5100:80"
- "5101:443"
depends_on:
- api1