-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·104 lines (97 loc) · 2.3 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
version: '3.3'
services:
prom:
image: prom/prometheus:v2.26.0-rc.0
volumes:
- ./prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus"
ports:
- 9090:9090
networks:
- promnet
jaeger:
image: jaegertracing/all-in-one:1.22.0
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "14267"
- "14268:14268"
- "14269"
- "16686:16686"
- "16687"
- "9411:9411"
restart: on-failure
networks:
- promnet
kafka:
container_name: kafka
image: krisgeus/docker-kafka
environment:
- AUTO_CREATE_TOPICS=true
- ADV_HOST=localhost
- ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,INTERNAL://localhost:9093
- LISTENERS=PLAINTEXT://0.0.0.0:9092,INTERNAL://0.0.0.0:9093
- SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT
- INTER_BROKER=INTERNAL
ports:
- 3030:3030
- 9092:9092
- 2181:2181
networks:
- promnet
cart-server:
container_name: cart-server
build:
context: .
dockerfile: cmd/server/Dockerfile
environment:
- CGO_ENABLED=0
- GOPROXY=https://proxy.golang.org,direct
- JAEGER_TRACING_URL=http://jaeger:14268/api/traces
- SERVER_PORT=:8888
- KAFKA_BROKERS=kafka:9092
depends_on:
- kafka
- prom
- jaeger
ports:
- 8888:8888
networks:
- promnet
cart-consumer:
container_name: cart-consumer
build:
context: .
dockerfile: cmd/consumer/Dockerfile
environment:
- CGO_ENABLED=0
- GOPROXY=https://proxy.golang.org,direct
- JAEGER_TRACING_URL=http://jaeger:14268/api/traces
- METRICS_SERVER_BIND_ADDR=:8889
- KAFKA_BROKERS=kafka:9092
- KAFKA_GROUP_ID=cart.consumer
depends_on:
- kafka
- prom
- jaeger
ports:
- 8889:8889
networks:
- promnet
start_dependencies:
image: dadarek/wait-for-dependencies
environment:
- SLEEP_LENGTH=2
- TIMEOUT_LENGTH=120
depends_on:
- kafka
- prom
- jaeger
command: kafka:9092 prom:9090 jaeger:14268
networks:
- promnet
networks:
promnet:
driver: bridge