-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
332 lines (318 loc) · 7.62 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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
version: '3.8'
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: '5'
max-size: '10m'
services:
traefik:
image: traefik:2.11
container_name: traefik
hostname: traefik
<<: *x-logging
command:
- --providers.docker=true
- --providers.docker.exposedByDefault=false
- --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`linkos`)
- --entrypoints.linkos_web.address=:80
restart: unless-stopped
depends_on:
- linkos
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- linkos
clickhouse:
image: clickhouse/clickhouse-server
container_name: clickhouse
hostname: clickhouse
<<: *x-logging
restart: unless-stopped
networks:
- linkos
healthcheck:
test: [ 'CMD', 'wget', 'http://localhost:8123' ]
interval: 5s
timeout: 5s
retries: 5
ulimits:
nofile:
soft: 262144
hard: 262144
environment:
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT
volumes:
- clickhouse:/var/lib/clickhouse
postgres:
image: postgres:15.2
container_name: postgres
hostname: postgres
<<: *x-logging
restart: unless-stopped
environment:
POSTGRES_PASSWORD:
POSTGRES_USER:
POSTGRES_DB:
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres:/var/lib/postgresql/data/pgdata
networks:
- linkos
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7.2.4-bookworm
container_name: redis
hostname: redis
<<: *x-logging
restart: unless-stopped
command: >
redis-server
--save 3600 1 300 100 60 1000
--loglevel warning
--maxmemory 1g
--maxmemory-policy allkeys-lru
--maxmemory-samples 5
networks:
- linkos
volumes:
- redis:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
kafka:
image: bitnami/kafka:3.6
container_name: kafka
hostname: kafka
<<: *x-logging
restart: unless-stopped
networks:
- linkos
volumes:
- kafka:/bitnami
environment:
- KAFKA_CFG_NODE_ID
- KAFKA_CFG_PROCESS_ROLES
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS
- KAFKA_CFG_LISTENERS
- KAFKA_CFG_ADVERTISED_LISTENERS
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME
healthcheck:
test: kafka-topics.sh --bootstrap-server kafka:9092 --list --topic-id 1
start_period: 15s
interval: 5s
timeout: 5s
retries: 5
linkos:
image: byawitz/linkos:CURRENT_LINKOS_VERSION
hostname: linkos
container_name: linkos
restart: unless-stopped
<<: *x-logging
networks:
- linkos
labels:
- traefik.enable=true
- traefik.constraint-label-stack=linkos
- traefik.docker.network=linkos
- traefik.http.services.linkos.loadbalancer.server.port=3000
- traefik.http.routers.linkos_api_http.rule=PathPrefix(`/v1/api`) || PathPrefix(`/dashboard`)
- traefik.http.routers.linkos_api_http.entrypoints=linkos_web
- traefik.http.routers.linkos_api_http.service=linkos
entrypoint: serve
environment:
- ENVIRONMENT
- DEFAULT_LOCAL
- PAGINATION_SIZE
- TOKEN_DRIVER
- APP_SSL_KEY
- API_ENDPOINT
- REDIS_HOST
- REDIS_PORT
- KAFKA_HOSTS
- CLICKHOUSE_PROTOCOL
- CLICKHOUSE_HOST
- CLICKHOUSE_PORT
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- NANOID_LETTERS
- NANOID_LENGTH
- KAFKA_NUMBER_OF_PARTITIONS
- MAIN_DOMAIN
- APPWRITE_ENDPOINT
- APPWRITE_PROJECT_ID
- APPWRITE_API_KEY
depends_on:
- kafka
- clickhouse
- postgres
- redis
linkos-links:
image: byawitz/linkos:CURRENT_LINKOS_VERSION
hostname: linkos-links
container_name: linkos-links
restart: unless-stopped
<<: *x-logging
networks:
- linkos
labels:
- traefik.enable=true
- traefik.constraint-label-stack=linkos
- traefik.docker.network=linkos
- traefik.http.services.linkos-links.loadbalancer.server.port=3000
- traefik.http.routers.linkos_links_http.rule=PathPrefix(`/`)
- traefik.http.routers.linkos_links_http.entrypoints=linkos_web
- traefik.http.routers.linkos_links_http.service=linkos-links
entrypoint: serve-links
environment:
- ENVIRONMENT
- DEFAULT_LOCAL
- TOKEN_DRIVER
- APP_SSL_KEY
- API_ENDPOINT
- REDIS_HOST
- REDIS_PORT
- KAFKA_HOSTS
- CLICKHOUSE_PROTOCOL
- CLICKHOUSE_HOST
- CLICKHOUSE_PORT
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- MAIN_REDIRECT_TO
depends_on:
- kafka
- postgres
- redis
linkos-analytics-consumer:
image: byawitz/linkos:CURRENT_LINKOS_VERSION
hostname: linkos-analytics-consumer
container_name: linkos-analytics-consumer
restart: unless-stopped
<<: *x-logging
entrypoint: analytics
networks:
- linkos
depends_on:
- kafka
- clickhouse
- postgres
environment:
- ENVIRONMENT
- DEFAULT_LOCAL
- TOKEN_DRIVER
- APP_SSL_KEY
- API_ENDPOINT
- REDIS_HOST
- REDIS_PORT
- KAFKA_HOSTS
- CLICKHOUSE_PROTOCOL
- CLICKHOUSE_HOST
- CLICKHOUSE_PORT
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
linkos-webhooks-consumer:
image: byawitz/linkos:CURRENT_LINKOS_VERSION
hostname: linkos-webhooks-consumer
container_name: linkos-webhooks-consumer
restart: unless-stopped
<<: *x-logging
entrypoint: webhooks
networks:
- linkos
depends_on:
- kafka
- postgres
- clickhouse
environment:
- ENVIRONMENT
- DEFAULT_LOCAL
- TOKEN_DRIVER
- APP_SSL_KEY
- API_ENDPOINT
- REDIS_HOST
- REDIS_PORT
- KAFKA_HOSTS
- CLICKHOUSE_PROTOCOL
- CLICKHOUSE_HOST
- CLICKHOUSE_PORT
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
linkos-scheduler:
image: byawitz/linkos:CURRENT_LINKOS_VERSION
hostname: linkos-scheduler
container_name: linkos-scheduler
restart: unless-stopped
<<: *x-logging
entrypoint: scheduler
networks:
- linkos
depends_on:
- kafka
- postgres
- clickhouse
environment:
- ENVIRONMENT
- DEFAULT_LOCAL
- TOKEN_DRIVER
- APP_SSL_KEY
- API_ENDPOINT
- REDIS_HOST
- REDIS_PORT
- KAFKA_HOSTS
- CLICKHOUSE_PROTOCOL
- CLICKHOUSE_HOST
- CLICKHOUSE_PORT
- CLICKHOUSE_DB
- CLICKHOUSE_USER
- CLICKHOUSE_PASSWORD
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- BACKUP_CRON
networks:
linkos:
name: linkos
volumes:
redis:
postgres:
clickhouse:
kafka: