-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
191 lines (176 loc) · 4.78 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: '3.5'
services:
degressly-core:
image: degressly-core
build:
context: ../degressly-core
dockerfile: ../degressly-core/Dockerfile
container_name: degressly-core
networks:
- degressly_demo_network
depends_on:
- degressly-demo-primary
- degressly-demo-secondary
- degressly-demo-candidate
- kafka
ports:
- "8000:8000"
env_file:
- .env
# Comparator config
zookeeper:
image: confluentinc/cp-zookeeper:7.4.4
container_name: degressly-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "22182:2181"
networks:
- degressly_demo_network
kafka:
image: confluentinc/cp-kafka:7.4.4
depends_on:
- zookeeper
container_name: kafka
networks:
- degressly_demo_network
ports:
- "29092:29092"
environment:
KAFKA_LISTENERS: EXTERNAL_SAME_HOST://:29092,INTERNAL://:9092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL_SAME_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_SAME_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: degressly-zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
restart: unless-stopped
degressly-comparator:
image: degressly-comparator
build:
context: ../degressly-comparator
dockerfile: ../degressly-comparator/Dockerfile
container_name: degressly-comparator
networks:
- degressly_demo_network
env_file:
- .env
depends_on:
- kafka
- mongo
mongo:
image: mongo
container_name: "degressly-mongo"
restart: always
ports:
- 27017:27017
env_file:
- .env
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DBNAME}
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js
networks:
- degressly_demo_network
# Comparator config complete
degressly-downstream:
image: degressly-downstream
build:
context: ../degressly-downstream
dockerfile: ../degressly-downstream/Dockerfile
container_name: degressly-downstream
networks:
- degressly_demo_network
ports:
- "8080:8080"
env_file:
- .env
depends_on:
- kafka
degressly-mitm-primary:
image: mitmproxy/mitmproxy
container_name: "degressly-mitm-primary"
environment:
PROXY_HEADER: PRIMARY
volumes:
- ./certs:/home/mitmproxy/.mitmproxy
- ./mitm.py:/mitm.py:ro
command: ["mitmdump", "-s", "mitm.py", "--no-http2"]
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
degressly-mitm-secondary:
image: mitmproxy/mitmproxy
container_name: "degressly-mitm-secondary"
environment:
PROXY_HEADER: SECONDARY
volumes:
- ./certs:/home/mitmproxy/.mitmproxy
- ./mitm.py:/mitm.py:ro
command: ["mitmdump", "-s", "mitm.py", "--no-http2"]
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
degressly-mitm-candidate:
image: mitmproxy/mitmproxy
container_name: "degressly-mitm-candidate"
environment:
PROXY_HEADER: CANDIDATE
volumes:
- ./certs:/home/mitmproxy/.mitmproxy
- ./mitm.py:/mitm.py:ro
command: ["mitmdump", "-s", "mitm.py", "--no-http2"]
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
degressly-demo-primary:
image: degressly-demo
container_name: "degressly-demo-primary"
build:
context: .
dockerfile: Dockerfile
environment:
HTTP_PROXY: https://degressly-mitm-primary:8080
HTTPS_PROXY: https://degressly-mitm-primary:8080
PORT: 8080
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
degressly-demo-secondary:
image: degressly-demo
container_name: "degressly-demo-secondary"
build:
context: .
dockerfile: Dockerfile
environment:
HTTP_PROXY: https://degressly-mitm-secondary:8080
HTTPS_PROXY: https://degressly-mitm-secondary:8080
PORT: 8081
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
degressly-demo-candidate:
image: degressly-demo
container_name: "degressly-demo-candidate"
build:
context: .
dockerfile: Dockerfile
environment:
HTTP_PROXY: https://degressly-mitm-candidate:8080
HTTPS_PROXY: https://degressly-mitm-candidate:8080
PORT: 8082
networks:
- degressly_demo_network
depends_on:
- degressly-downstream
networks:
degressly_demo_network:
name: degressly_example_network