forked from featbit/featbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-pro.yml
169 lines (159 loc) · 4.78 KB
/
docker-compose-pro.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
name: featbit-pro
version: "3"
services:
ui:
image: featbit/featbit-ui:latest
environment:
- API_URL=http://localhost:5000
- DEMO_URL=https://featbit-samples.vercel.app
- EVALUATION_URL=http://localhost:5100
depends_on:
- api-server
ports:
- "8081:80"
networks:
- featbit-network
api-server:
image: featbit/featbit-api-server:latest
environment:
- MongoDb__ConnectionString=mongodb://admin:password@mongodb:27017
- MongoDb__Database=featbit
- Kafka__BootstrapServers=kafka:9092
- Redis__ConnectionString=redis:6379
- OLAP__ServiceHost=http://da-server
- IS_PRO=true
depends_on:
- mongodb
- redis
- kafka
- da-server
ports:
- "5000:5000"
networks:
- featbit-network
evaluation-server:
image: featbit/featbit-evaluation-server:latest
environment:
- MongoDb__ConnectionString=mongodb://admin:password@mongodb:27017
- MongoDb__Database=featbit
- Kafka__BootstrapServers=kafka:9092
- Redis__ConnectionString=redis:6379
- IS_PRO=true
depends_on:
- mongodb
- kafka
- redis
ports:
- "5100:5100"
networks:
- featbit-network
da-server:
image: featbit/featbit-data-analytics-server:latest
depends_on:
- kafka
- clickhouse-server
ports:
- "8200:80"
networks:
- featbit-network
environment:
KAFKA_HOSTS: kafka:9092
REDIS_URL: redis://redis:6379/0
CLICKHOUSE_HOST: clickhouse-server
CLICKHOUSE_KAFKA_HOSTS: kafka:9092
IS_PRO: true
mongodb:
image: mongo:5.0.14
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
restart: on-failure
environment:
- ALLOW_EMPTY_PASSWORD=yes
networks:
- featbit-network
ports:
- "6379:6379"
volumes:
- redis:/data
kafka:
image: bitnami/kafka:3.5
restart: on-failure
ports:
- '9092:9092'
- '29092:29092'
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:29092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
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.5
depends_on:
kafka:
condition: service_started
networks:
- featbit-network
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 featbit-feature-flag-change;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic featbit-segment-change;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic featbit-endusers;
/opt/bitnami/kafka/bin/kafka-topics.sh --create --if-not-exists --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 --topic featbit-insights;
echo "Seed kafka topic finished."
clickhouse-server:
image: clickhouse/clickhouse-server:23.7
container_name: clickhouse-server
restart: on-failure
depends_on:
- kafka
ports:
- "8123:8123"
- "8443:8443"
- "9000:9000"
- "9009:9009"
- "9440:9440"
- "9181:9181"
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
networks:
featbit-network:
name: featbit-network
driver: bridge
ipam:
config:
- subnet: 172.10.0.0/16
volumes:
mongodb:
redis:
kafka:
clickhouse-server: