-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.infra.yml
233 lines (221 loc) · 6.48 KB
/
docker-compose.infra.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
services:
db:
image: postgres:15-alpine
container_name: db
restart: always
environment:
POSTGRES_DB: ${DB_NAME:-gauzy}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-gauzy_password}
healthcheck:
test:
[
'CMD-SHELL',
'psql postgres://$${POSTGRES_USER}:$${POSTGRES_PASSWORD}@localhost:5432/$${POSTGRES_DB} || exit 1'
]
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./.deploy/db/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
ports:
- '5432:5432'
networks:
- overlay
zipkin:
image: ghcr.io/openzipkin/zipkin-slim:latest
container_name: zipkin
# Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
environment:
- STORAGE_TYPE=mem
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to increase heap size
# - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
ports:
# Port used for the Zipkin UI and HTTP Api
- 9411:9411
networks:
- overlay
cube:
image: cubejs/cube:latest
container_name: cube
ports:
- '4000:4000' # Cube Playground
- '5430:5430' # Port for Cube SQL
environment:
CUBEJS_DEV_MODE: 'true'
CUBEJS_DB_TYPE: postgres
CUBEJS_DB_HOST: db
CUBEJS_DB_PORT: 5432
CUBEJS_DB_NAME: ${DB_NAME:-gauzy}
CUBEJS_DB_USER: ${DB_USER:-postgres}
CUBEJS_DB_PASS: ${DB_PASS:-gauzy_password}
# Credentials to connect to Cube SQL APIs
CUBEJS_PG_SQL_PORT: 5430
CUBEJS_SQL_USER: ${CUBE_USER:-cube_user}
CUBEJS_SQL_PASSWORD: ${CUBE_PASS:-cube_pass}
volumes:
- 'cube_data:/cube/conf'
links:
- db
networks:
- overlay
jitsu:
container_name: jitsu
image: jitsucom/jitsu:latest
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- REDIS_URL=redis://redis:6379
# Retroactive users recognition can affect RAM significant.
# Read more about the solution https://jitsu.com/docs/other-features/retroactive-user-recognition
- USER_RECOGNITION_ENABLED=true
- USER_RECOGNITION_REDIS_URL=redis://jitsu_redis_users_recognition:6380
- TERM=xterm-256color
depends_on:
redis:
condition: service_healthy
jitsu_redis_users_recognition:
condition: service_healthy
volumes:
- ./.deploy/jitsu/configurator/data/logs:/home/configurator/data/logs
- ./.deploy/jitsu/server/data/logs:/home/eventnative/data/logs
- ./.deploy/jitsu/server/data/logs/events:/home/eventnative/data/logs/events
- /var/run/docker.sock:/var/run/docker.sock
- jitsu_workspace:/home/eventnative/data/airbyte
restart: always
ports:
- '8000:8000'
networks:
- overlay
elasticsearch:
image: 'elasticsearch:7.17.7'
container_name: elasticsearch
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: -Xms512m -Xmx1024m
discovery.type: single-node
http.port: 9200
http.cors.enabled: 'true'
http.cors.allow-origin: http://localhost:3000,http://127.0.0.1:3000,http://localhost:1358,http://127.0.0.1:1358
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: 'true'
bootstrap.memory_lock: 'true'
xpack.security.enabled: 'false'
ports:
- '9200'
- '9300'
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9200/_cat/health']
interval: 5s
timeout: 5s
retries: 10
start_period: 20s
networks:
- overlay
# Elasticsearch Management UI
dejavu:
image: appbaseio/dejavu:3.6.0
container_name: dejavu
ports:
- '1358:1358'
links:
- elasticsearch
networks:
- overlay
# TODO: For now used in Jitsu, but we will need to create another one dedicated for Jitsu later
redis:
image: 'redis:7.0.2-alpine'
container_name: redis
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'redis-cli -h localhost -p 6379 PING']
interval: 1s
timeout: 30s
ports:
- '6379'
volumes:
- ./.deploy/redis/data:/data
networks:
- overlay
jitsu_redis_users_recognition:
image: 'redis:7.0.2-alpine'
container_name: jitsu_redis_users_recognition
command: redis-server /usr/local/etc/redis/redis.conf
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'redis-cli -h localhost -p 6380 PING']
interval: 1s
timeout: 30s
ports:
- '6380'
volumes:
- ./.deploy/redis/jitsu_users_recognition/data:/data
- ./.deploy/redis/jitsu_users_recognition/redis.conf:/usr/local/etc/redis/redis.conf
networks:
- overlay
minio:
restart: unless-stopped
image: quay.io/minio/minio:latest
container_name: minio
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: ever-gauzy-access-key
MINIO_ROOT_PASSWORD: ever-gauzy-secret-key
command: server /data --address :9000 --console-address ":9001"
ports:
- 9000:9000
- 9001:9001
networks:
- overlay
minio_create_buckets:
image: minio/mc
environment:
MINIO_ROOT_USER: ever-gauzy-access-key
MINIO_ROOT_PASSWORD: ever-gauzy-secret-key
entrypoint:
- '/bin/sh'
- '-c'
command:
- "until (/usr/bin/mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD) do
echo 'Waiting to start minio...' && sleep 1;
done;
/usr/bin/mc mb minio/ever-gauzy --region=eu-north-1;
exit 0;"
depends_on:
- minio
networks:
- overlay
pgweb:
image: sosedoff/pgweb
container_name: pgweb
restart: always
depends_on:
- db
links:
- db:${DB_HOST:-db}
environment:
POSTGRES_DB: ${DB_NAME:-gauzy}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASS:-gauzy_password}
PGWEB_DATABASE_URL: postgres://${DB_USER:-postgres}:${DB_PASS:-gauzy_password}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-gauzy}?sslmode=disable
ports:
- '8081:8081'
networks:
- overlay
volumes:
postgres_data: {}
redis_data: {}
elasticsearch_data: {}
minio_data: {}
cube_data: {}
certificates: {}
jitsu_workspace: {}
networks:
overlay:
driver: bridge