-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
246 lines (230 loc) · 6 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
version: '3.7'
services:
zookeeper:
container_name: zookeeper
image: docker.io/bitnami/zookeeper:3.6
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
env_file:
- ./conf/local/zookeeper.env
kafka:
container_name: kafka
image: docker.io/bitnami/kafka:3.1
ports:
- "9093:9093"
volumes:
- "kafka_data:/bitnami"
env_file:
- ./conf/local/kafka.env
depends_on:
- zookeeper
kafka_init_topics:
image: docker.io/bitnami/kafka:3.1
depends_on:
- kafka
entrypoint: [ '/bin/sh', '-c' ]
command: |
"
# blocks until kafka is reachable
kafka-topics.sh --bootstrap-server kafka:9092 --list
echo -e 'Creating kafka topics'
kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic test_sha --replication-factor 1 --partitions 1
echo -e 'Successfully created the following topics:'
kafka-topics.sh --bootstrap-server kafka:9092 --list
"
vuln4shift_database:
container_name: vuln4shift-database
image: vuln4shift-db
build:
context: .
dockerfile: ./dev/database/Dockerfile
restart: unless-stopped
env_file:
- ./conf/common.env
- ./conf/db.env
ports:
- 25432:5432
volumes:
- vuln4shift-db-data:/var/lib/pgsql/data
vuln4shift_dbadmin:
command: /vuln4shift/main dbadmin
container_name: vuln4shift-dbadmin
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/dbadmin.env
depends_on:
- vuln4shift_database
vuln4shift_manager:
command: /vuln4shift/main manager
container_name: vuln4shift-manager
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/manager.env
ports:
- 8000:8000
depends_on:
vuln4shift_database:
condition: service_started
vuln4shift_dbadmin:
condition: service_completed_successfully
vuln4shift_digestwriter:
command: /vuln4shift/main digestwriter
container_name: vuln4shift-digestwriter
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/digestwriter.env
depends_on:
vuln4shift_database:
condition: service_started
vuln4shift_dbadmin:
condition: service_completed_successfully
kafka_init_topics:
condition: service_completed_successfully
# --------------------------------------------------
# unit tests profile containers
vuln4shift_unit_tests:
command: go test -v -p 1 -coverprofile=coverage.txt -covermode=atomic ./...
container_name: vuln4shift-unit-tests
build:
context: .
dockerfile: ./Dockerfile
target: buildimg
image: vuln4shift/app:buildimg
env_file:
- ./conf/common.env
- ./conf/tests.env
environment:
- GIN_MODE=release
depends_on:
vuln4shift_database:
condition: service_started
vuln4shift_dbadmin:
condition: service_completed_successfully
profiles:
- unit-tests
volumes:
- ./:/vuln4shift
vuln4shift_pyxis:
command: /vuln4shift/main pyxis
container_name: vuln4shift-pyxis
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/pyxis.env
depends_on:
vuln4shift_database:
condition: service_started
profiles:
- pyxis
vuln4shift_vmsync:
command: /vuln4shift/main vmsync
container_name: vuln4shift-vmsync
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/vmsync.env
depends_on:
vuln4shift_database:
condition: service_started
profiles:
- vmsync
vuln4shift_cleaner:
command: /vuln4shift/main cleaner
container_name: vuln4shift-cleaner
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/cleaner.env
depends_on:
vuln4shift_database:
condition: service_started
profiles:
- cleaner
vuln4shift_prometheus:
container_name: vuln4shift-prometheus
image: prom/prometheus:v2.36.0
volumes:
- vuln4shift-prometheus-data:/prometheus
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
security_opt:
- label=disable
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9095:9090
depends_on:
- vuln4shift_digestwriter
- vuln4shift_manager
restart: unless-stopped
vuln4shift_grafana:
container_name: vuln4shift-grafana
build:
context: ./
dockerfile: ./monitoring/grafana/Dockerfile
image: vuln4shift/grafana:latest
depends_on:
- vuln4shift_prometheus
ports:
- 3005:3000
restart: unless-stopped
vuln4shift_expsync:
command: /vuln4shift/main expsync
container_name: vuln4shift-expsync
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/expsync.env
depends_on:
vuln4shift_database:
condition: service_started
profiles:
- expsync
vuln4shift_repack:
command: /vuln4shift/main repack
container_name: vuln4shift-repack
build:
context: .
dockerfile: ./Dockerfile
image: vuln4shift/app:latest
env_file:
- ./conf/common.env
- ./conf/dbadmin.env
depends_on:
vuln4shift_database:
condition: service_started
profiles:
- repack
volumes:
vuln4shift-db-data:
zookeeper_data:
kafka_data:
vuln4shift-prometheus-data: