-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
299 lines (274 loc) · 7.26 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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
version: '3.9'
services:
#postgresql:
postgres:
image: postgres:${POSTGRES_VERSION}
container_name: postgres
build: ./docker/postgres
hostname: ${POSTGRES_HOSTNAME}
restart: always
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- ./docker/postgres/postgresql.conf.sample:/usr/share/postgresql/postgresql.conf.sample
- ./postgres_init.sql:/docker-entrypoint-initdb.d/postgres_init.sql
- postgres:/var/lib/postgresql/data
command: postgres -c 'max_connections=500'
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
networks:
- ezbuy-network
#pgadmin:
pgadmin:
image: dpage/pgadmin4:${PGADMIN_VERSION}
container_name: pgadmin
restart: unless-stopped
ports:
- "${PGADMIN_LISTEN_PORT}:80"
volumes:
- pgadmin:/var/lib/pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL
- PGADMIN_DEFAULT_PASSWORD
networks:
- ezbuy-network
#keycloak:
keycloak:
image: keycloak/keycloak:${KEYCLOAK_VERSION}
container_name: keycloak
command: start-dev
restart: always
depends_on:
- postgres
ports:
- "${KEYCLOAK_PORT}:8080"
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: ${POSTGRES_USER}
KC_DB_PASSWORD: ${POSTGRES_PASSWORD}
# KC_DB: h2
KC_HOSTNAME: localhost
KC_HOSTNAME_PORT: 8080
KC_HOSTNAME_STRICT: false
KC_HOSTNAME_STRICT_HTTPS: false
# KC_PROXY_ADDRESS_FORWARDING: true
KC_LOG_LEVEL: info
KC_METRICS_ENABLED: true
KC_HEALTH_ENABLED: true
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
# KC_HTTP_ENABLED: true
KC_HTTP_PORT: 8080
KC_HTTPS_PORT: 8443
volumes:
# - ./docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json
- ./docker/keycloak/themes/ezbuy/theme:/opt/keycloak/themes
- keycloak:/opt/keycloak/data
networks:
- ezbuy-network
#minio
minio:
image: minio/minio:${MINIO_VERSION}
container_name: minio
env_file: .env
restart: unless-stopped
ports:
- "9000:9000" #Buckets
- "9001:9001" #Console
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
# - ./docker/minio/data:/data:ro
- minio:/data:rw
command: [ "server", "--address", ":9000", "--console-address", ":9001", "/data" ]
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:9000/minio/health/live" ]
interval: 60s
timeout: 10s
retries: 3
networks:
- ezbuy-network
#swagger-ui
swagger-ui:
image: swaggerapi/swagger-ui:${SWAGGER_VERSION}
container_name: swagger-ui
restart: unless-stopped
environment:
- BASE_URL=/swagger-ui
- URLS
- OAUTH_CLIENT_ID=swagger-ui
- OAUTH_USE_PKCE=true
networks:
- ezbuy-network
#zookeeper
zookeeper:
image: debezium/zookeeper:${ZOOKEEPER_VERSION}
restart: always
container_name: zookeeper
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
networks:
- ezbuy-network
#kafka
kafka:
image: confluentinc/cp-kafka:${KAFKA_VERSION}
hostname: ${KAFKA_SERVICE_HOST}
depends_on:
- zookeeper
container_name: kafka
restart: unless-stopped
ports:
- ${KAFKA_SERVICE_PORT}:${KAFKA_SERVICE_PORT}
- "29092:29092"
environment:
- KAFKA_BROKER_ID
- KAFKA_ZOOKEEPER_CONNECT
- KAFKA_ADVERTISED_LISTENERS
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
- KAFKA_INTER_BROKER_LISTENER_NAME
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
networks:
- ezbuy-network
#kafka-connect
kafka-connect:
image: debezium/connect:${KAFKA_CONNECT_VERSION}
restart: always
container_name: kafka-connect
ports:
- "8083:8083"
- "5005:5005"
depends_on:
- kafka
environment:
- BOOTSTRAP_SERVERS=kafka:9092
- GROUP_ID=1
- CONFIG_STORAGE_TOPIC=kafka_connect_configs
- OFFSET_STORAGE_TOPIC=kafka_connect_offsets
networks:
- ezbuy-network
###########################
#setup
#elasticsearch
#logstash
#kibana
###########################
setup:
profiles:
- setup
build:
context: ./docker/setup/
args:
ELASTIC_VERSION: ${ELASTIC_VERSION}
container_name: setup
init: true
volumes:
- ./docker/setup/entrypoint.sh:/entrypoint.sh:ro,Z
- ./docker/setup/lib.sh:/lib.sh:ro,Z
- ./docker/setup/roles:/roles:ro,Z
environment:
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
METRICBEAT_INTERNAL_PASSWORD: ${METRICBEAT_INTERNAL_PASSWORD:-}
FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-}
HEARTBEAT_INTERNAL_PASSWORD: ${HEARTBEAT_INTERNAL_PASSWORD:-}
MONITORING_INTERNAL_PASSWORD: ${MONITORING_INTERNAL_PASSWORD:-}
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-}
depends_on:
- elasticsearch
networks:
- ezbuy-network
#elasticsearch
elasticsearch:
build:
context: ./docker/elasticsearch/
args:
ELASTIC_VERSION: ${ELASTIC_VERSION}
container_name: elasticsearch
volumes:
- ./docker/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z
- elasticsearch:/usr/share/elasticsearch/data:Z
ports:
- "9200:9200"
- "9300:9300"
environment:
node.name: elasticsearch
ES_JAVA_OPTS: -Xms512m -Xmx512m
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
discovery.type: single-node
restart: unless-stopped
networks:
- ezbuy-network
#logstash
logstash:
build:
context: ./docker/logstash/
args:
ELASTIC_VERSION: ${ELASTIC_VERSION}
container_name: logstash
volumes:
- ./docker/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z
- ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro,Z
ports:
- "5044:5044"
- "50000:50000/tcp"
- "50000:50000/udp"
- "9600:9600"
environment:
LS_JAVA_OPTS: -Xms256m -Xmx256m
LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
depends_on:
- elasticsearch
restart: unless-stopped
networks:
- ezbuy-network
#kibana
kibana:
build:
context: ./docker/kibana/
args:
ELASTIC_VERSION: ${ELASTIC_VERSION}
container_name: kibana
volumes:
- ./docker/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z
ports:
- "5601:5601"
environment:
KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
depends_on:
- elasticsearch
restart: unless-stopped
networks:
- ezbuy-network
#memos
memos:
image: neosmemo/memos:stable
container_name: memos
volumes:
- memos:/var/opt/memos
ports:
- "5230:5230"
networks:
- ezbuy-network
# networks:
networks:
ezbuy-network:
driver: bridge
name: ezbuy-network
external: true
# proxy:
# external: true
# keycloak:
# volumes:
volumes:
postgres:
pgadmin:
keycloak:
minio:
memos:
elasticsearch: