-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
130 lines (129 loc) · 3.71 KB
/
docker-compose.yaml
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
version: "3.9"
services:
crawler:
image: bronbro/spacebox-crawler:latest
environment:
ENV_FILE: "/opt/.env"
restart: unless-stopped
volumes:
- .env:/opt/.env
ports:
- '2112:2112'
logging:
driver: "json-file"
options:
max-size: "300m"
max-file: "5"
depends_on:
kafka:
condition: service_healthy
zookeeper:
condition: service_started
mongo-crawler:
condition: service_started
kafka-ui:
container_name: spacebox-kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- '8080:8080'
restart: unless-stopped
depends_on:
kafka:
condition: service_started
zookeeper:
condition: service_started
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9093
AUTH_TYPE: "LOGIN_FORM"
SPRING_SECURITY_USER_NAME: default
SPRING_SECURITY_USER_PASSWORD: ${KAFKA_UI_PASSWORD:-password}
zookeeper:
image: bitnami/zookeeper:3.9.2
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
restart: unless-stopped
container_name: spacebox-zookeeper
volumes:
- ./volumes/zookeeper:/bitnami/zookeeper
kafka:
image: bitnami/kafka:3.7.0
ports:
- '9092:9092'
- '9093:9093'
hostname: kafka
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9093,EXTERNAL://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9093,EXTERNAL://localhost:9092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true
- KAFKA_CFG_LOG_RETENTION_BYTES=16106127360
- KAFKA_CFG_MESSAGE_MAX_BYTES=${MAX_MESSAGE_MAX_BYTES}
- KAFKA_CFG_REPLICA_FETCH_MAX_BYTES=157286400
volumes:
- ./volumes/kafka:/bitnami/kafka
restart: unless-stopped
depends_on:
zookeeper:
condition: service_started
healthcheck:
test: kafka-topics.sh --list --bootstrap-server localhost:9092
interval: 120s
timeout: 60s
retries: 5
migration:
image: migrate/migrate:latest
command: |
-path=/migrations/clickhouse
-database="clickhouse://clickhouse:9000/spacebox?username=default&x-multi-statement=true&password=${CLICKHOUSE_PASSWORD:-password}"
up
volumes:
- ./migrations:/migrations
depends_on:
clickhouse:
condition: service_healthy
clickhouse:
image: clickhouse/clickhouse-server:24.5.1
restart: unless-stopped
hostname: clickhouse
ulimits:
nofile:
soft: 262144
hard: 262144
ports:
- '8123:8123'
- '9000:9000'
- '9009:9009'
- '8001:8001'
environment:
CLICKHOUSE_INIT_TIMEOUT: 60
CLICKHOUSE_DB: spacebox
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-password}
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping
interval: 60s
timeout: 10s
retries: 5
volumes:
- ./volumes/clickhouse/data:/var/lib/clickhouse
- ./volumes/clickhouse/logs:/var/log/clickhouse-server
- ./config/clickhouse/users.d/:/etc/clickhouse-server/users.d/
- ./config/clickhouse/config.d/:/etc/clickhouse-server/config.d/
mongo-crawler:
image: mongo:6.0.3
restart: always
hostname: mongo-1
environment:
MONGO_INITDB_ROOT_USERNAME: spacebox_user
MONGO_INITDB_ROOT_PASSWORD: spacebox_password
MONGO_INITDB_DATABASE: spacebox
ports:
- '27018:27017'
volumes:
- ./volumes/mongo/crawler:/data/db