forked from featbit/featbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-pro-dev.yml
More file actions
226 lines (213 loc) · 5.9 KB
/
docker-compose-pro-dev.yml
File metadata and controls
226 lines (213 loc) · 5.9 KB
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
name: featbit-pro-dev
version: "3"
services:
ui:
image: featbit/ui:dev
container_name: ui
build:
context: ./modules/front-end
dockerfile: ./Dockerfile
environment:
- API_URL=http://localhost:5000
- DEMO_URL=http://localhost:5173
- EVALUATION_URL= http://localhost:5100
depends_on:
- api-server
- demo-dino-game-vue
ports:
- "8081:80"
networks:
- featbit-network
api-server:
image: featbit/api:dev
container_name: api
build:
context: ./modules/back-end
dockerfile: ./deploy/Dockerfile
environment:
- IS_PRO=true
depends_on:
mongodb:
condition: service_started
init-kafka-topics:
condition: service_completed_successfully
da-server:
condition: service_started
ports:
- "5000:5000"
networks:
- featbit-network
evaluation-server:
image: featbit/evaluation-server:dev
container_name: evaluation-server
build:
context: ./modules/evaluation-server
dockerfile: ./deploy/Dockerfile
environment:
- IS_PRO=true
depends_on:
mongodb:
condition: service_started
init-kafka-topics:
condition: service_completed_successfully
redis:
condition: service_started
ports:
- "5100:5100"
networks:
- featbit-network
da-server:
image: featbit/data-analytics-server:dev
container_name: data-analytics-server
build:
context: ./modules/data-analytics
dockerfile: ./Dockerfile
depends_on:
- zookeeper
- kafka
- clickhouse-server
ports:
- "8200:80"
networks:
- featbit-network
environment:
KAFKA_HOSTS: kafka:9092
REDIS_HOST: redis
REDIS_PORT: 6379
CLICKHOUSE_HOST: clickhouse-server
CLICKHOUSE_KAFKA_HOSTS: kafka:9092
IS_PRO: true
mongodb:
image: mongo:5.0.14
container_name: mongodb
restart: on-failure
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
- MONGO_INITDB_DATABASE=featbit
volumes:
- mongodb:/data/db
- ./infra/mongodb/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/
networks:
- featbit-network
redis:
image: bitnami/redis:6.2.10
container_name: redis
restart: on-failure
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- featbit-network
ports:
- "6379:6379"
volumes:
- redis:/bitnami/redis/data
zookeeper:
image: bitnami/zookeeper:3.8.1
container_name: zookeeper
restart: on-failure
ports:
- '2181:2181'
volumes:
- zookeeper:/bitnami/zookeeper
environment:
ALLOW_ANONYMOUS_LOGIN: 'true'
networks:
- featbit-network
kafka:
image: bitnami/kafka:3.2.3
container_name: kafka
restart: on-failure
depends_on:
- zookeeper
ports:
- '9092:9092'
- '29092:29092'
environment:
KAFKA_BROKER_ID: 1001
KAFKA_CFG_RESERVED_BROKER_MAX_ID: 1001
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'
ALLOW_PLAINTEXT_LISTENER: 'true'
networks:
- featbit-network
volumes:
- kafka:/bitnami/kafka
init-kafka-topics:
image: bitnami/kafka:3.2.3
depends_on:
kafka:
condition: service_started
entrypoint:
- bash
- -c
- |
echo "Waiting for Kafka to be ready..."
until /opt/bitnami/kafka/bin/kafka-topics.sh --list --bootstrap-server kafka:9092; do sleep 5; done;
echo "Kafka is ready now, start creating topics."
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic api-feature-flag-change;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic api-segment-change;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic evaluation-server-endusers;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic ch_events_json;
echo "Seed kafka topic finished."
networks:
- featbit-network
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
ports:
- "8080:8080"
restart: on-failure
depends_on:
- zookeeper
- kafka
environment:
- KAFKA_CLUSTERS_0_NAME=featbit-kafka
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
networks:
- featbit-network
clickhouse-server:
image: clickhouse/clickhouse-server:22.3
container_name: clickhouse-server
restart: on-failure
depends_on:
- zookeeper
- kafka
ports:
- "8123:8123"
- "8443:8443"
- "9000:9000"
- "9009:9009"
- "9440:9440"
networks:
- featbit-network
volumes:
- ./infra/clickhouse/single_node/config.xml:/etc/clickhouse-server/config.xml
- ./infra/clickhouse/users.xml:/etc/clickhouse-server/users.xml
- clickhouse-server:/var/lib/clickhouse
demo-dino-game-vue:
image: featbit/demo-dino-game-vue:latest
container_name: demo-dino-game-vue
networks:
- featbit-network
ports:
- "5173:80"
networks:
featbit-network:
name: featbit-network
driver: bridge
ipam:
config:
- subnet: 172.1.0.0/16
volumes:
mongodb:
redis:
kafka:
clickhouse-server:
zookeeper: