-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
219 lines (205 loc) · 4.84 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
version: "3.9"
services:
postgres:
image: postgres:latest
restart: always
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: postgres
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
networks:
- ocpca
volumes:
- pgdata:/var/lib/postgresql/data
ocp-certificate-api:
build: .
restart: unless-stopped
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: ocp-certificate-api
networks:
- ocpca
depends_on:
- postgres
- kafka
links:
- postgres
ports:
- 8081:8081 # rest
- 8082:8082 # grpc
- 9100:9100 # prometheus
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8081/health" ]
interval: 1m
timeout: 10s
retries: 3
start_period: 20s
volumes:
- ./migrations:/root/migrations
zookeeper:
image: confluentinc/cp-zookeeper
restart: unless-stopped
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: zookeeper
ports:
- 2181:2181
environment:
zk_id: "1"
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_SYNC_LIMIT: 2
networks:
- ocpca
kafka:
image: confluentinc/cp-kafka
restart: unless-stopped
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: kafka
depends_on:
- zookeeper
ports:
- 9094:9094
environment:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:32181"
KAFKA_LISTENERS: INTERNAL://kafka:9092,OUTSIDE://kafka:9094
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,OUTSIDE://localhost:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
- ocpca
kafka-ui:
image: obsidiandynamics/kafdrop
restart: unless-stopped
depends_on:
- kafka
ports:
- 9001:9001
environment:
SERVER_PORT: 9001
KAFKA_BROKERCONNECT: "kafka:9092"
JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify"
networks:
- ocpca
swagger-ui:
image: swaggerapi/swagger-ui
ports:
- 8080:8080
restart: always
volumes:
- ./swagger:/docs
environment:
SWAGGER_JSON: /docs/api.swagger.json
depends_on:
- ocp-certificate-api
networks:
- ocpca
jaeger:
image: jaegertracing/all-in-one
restart: unless-stopped
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: jaeger
ports:
- 6831:6831/udp
- 16686:16686
networks:
- ocpca
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
logging:
driver: 'gelf'
options:
gelf-address: 'udp://localhost:12201'
tag: prometheus
ports:
- 9090:9090
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
networks:
- ocpca
grafana:
image: grafana/grafana:latest
restart: unless-stopped
ports:
- 3000:3000
links:
- prometheus:prometheus
volumes:
- "./data/grafana:/var/lib/grafana"
environment:
- GF_SECURITY_ADMIN_PASSWORD=MYPASSWORT
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- ocpca
# MongoDB: https://hub.docker.com/_/mongo/
mongo:
image: mongo:3
networks:
- ocpca
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.10
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
deploy:
resources:
limits:
memory: 1g
networks:
- ocpca
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
image: graylog/graylog:3.3
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://localhost:9000/
networks:
- ocpca
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
volumes:
pgdata:
networks:
ocpca:
driver: bridge