forked from ever-co/ever-gauzy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
356 lines (341 loc) · 11 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
version: '3.8'
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
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
api:
container_name: api
image: ghcr.io/ever-co/gauzy-api:latest
environment:
API_HOST: ${API_HOST:-api}
API_PORT: ${API_PORT:-3000}
NODE_ENV: ${NODE_ENV:-development}
DB_HOST: db
API_BASE_URL: ${API_BASE_URL:-http://localhost:3000}
CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200}
CLOUD_PROVIDER: ${CLOUD_PROVIDER:-}
SENTRY_DSN: ${SENTRY_DSN:-}
SENTRY_HTTP_TRACING_ENABLED: ${SENTRY_HTTP_TRACING_ENABLED:-}
SENTRY_POSTGRES_TRACKING_ENABLED: ${SENTRY_POSTGRES_TRACKING_ENABLED:-}
SENTRY_PROFILING_ENABLED: ${SENTRY_PROFILING_ENABLED:-}
JITSU_SERVER_URL: ${JITSU_SERVER_URL:-}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}
OTEL_EXPORTER_OTLP_HEADERS: ${OTEL_EXPORTER_OTLP_HEADERS:-}
OTEL_ENABLED: ${OTEL_ENABLED:-}
JITSU_SERVER_WRITE_KEY: ${JITSU_SERVER_WRITE_KEY:-}
GAUZY_GITHUB_CLIENT_ID: ${GAUZY_GITHUB_CLIENT_ID:-}
GAUZY_GITHUB_CLIENT_SECRET: ${GAUZY_GITHUB_CLIENT_SECRET:-}
GAUZY_GITHUB_WEBHOOK_URL: ${GAUZY_GITHUB_WEBHOOK_URL:-}
GAUZY_GITHUB_WEBHOOK_SECRET: ${GAUZY_GITHUB_WEBHOOK_SECRET:-}
GAUZY_GITHUB_APP_PRIVATE_KEY: ${GAUZY_GITHUB_APP_PRIVATE_KEY:-}
GAUZY_GITHUB_APP_ID: ${GAUZY_GITHUB_APP_ID:-}
GAUZY_GITHUB_APP_NAME: ${GAUZY_GITHUB_APP_NAME:-}
GAUZY_GITHUB_POST_INSTALL_URL: ${GAUZY_GITHUB_POST_INSTALL_URL:-}
GAUZY_GITHUB_OAUTH_CLIENT_ID: ${GAUZY_GITHUB_OAUTH_CLIENT_ID:-}
GAUZY_GITHUB_OAUTH_CLIENT_SECRET: ${GAUZY_GITHUB_OAUTH_CLIENT_SECRET:-}
GAUZY_GITHUB_OAUTH_CALLBACK_URL: ${GAUZY_GITHUB_OAUTH_CALLBACK_URL:-}
MAGIC_CODE_EXPIRATION_TIME: ${MAGIC_CODE_EXPIRATION_TIME:-}
APP_NAME: ${APP_NAME:-}
APP_LOGO: ${APP_LOGO:-}
APP_SIGNATURE: ${APP_SIGNATURE:-}
APP_LINK: ${APP_LINK:-}
APP_EMAIL_CONFIRMATION_URL: ${APP_EMAIL_CONFIRMATION_URL:-}
APP_MAGIC_SIGN_URL: ${APP_MAGIC_SIGN_URL:-}
COMPANY_LINK: ${COMPANY_LINK:-}
COMPANY_NAME: ${COMPANY_NAME:-}
env_file:
- .env.compose
entrypoint: './entrypoint.compose.sh'
command: ['node', 'main.js']
restart: on-failure
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
minio:
condition: service_started
minio_create_buckets:
condition: service_started
elasticsearch:
condition: service_healthy
cube:
condition: service_started
links:
- db:${DB_HOST:-db}
- cube:${CUBE_HOST:-cube}
- redis:${REDIS_HOST:-redis}
- minio:${MINIO_HOST:-minio}
- elasticsearch:${ES_HOST:-elasticsearch}
# volumes:
# - webapp_node_modules:/srv/gauzy/node_modules
# - api_node_modules:/srv/gauzy/apps/api/node_modules
ports:
- '3000:${API_PORT:-3000}'
networks:
- overlay
webapp:
container_name: webapp
image: ghcr.io/ever-co/gauzy-webapp:latest
environment:
WEB_HOST: ${WEB_HOST:-webapp}
WEB_PORT: ${WEB_PORT:-4200}
NODE_ENV: ${NODE_ENV:-development}
API_BASE_URL: ${API_BASE_URL:-http://localhost:3000}
CLIENT_BASE_URL: ${CLIENT_BASE_URL:-http://localhost:4200}
SENTRY_DSN: ${SENTRY_DSN:-}
SENTRY_TRACES_SAMPLE_RATE: ${SENTRY_TRACES_SAMPLE_RATE:-0.1}
SENTRY_PROFILE_SAMPLE_RATE: ${SENTRY_PROFILE_SAMPLE_RATE:-1}
CHATWOOT_SDK_TOKEN: ${CHATWOOT_SDK_TOKEN:-}
CLOUDINARY_CLOUD_NAME: ${CLOUDINARY_CLOUD_NAME:-}
CLOUDINARY_API_KEY: ${CLOUDINARY_API_KEY:-}
GOOGLE_MAPS_API_KEY: ${GOOGLE_MAPS_API_KEY:-}
GOOGLE_PLACE_AUTOCOMPLETE: ${GOOGLE_PLACE_AUTOCOMPLETE:-false}
DEFAULT_LATITUDE: ${DEFAULT_LATITUDE:-42.6459136}
DEFAULT_LONGITUDE: ${DEFAULT_LONGITUDE:-23.3332736}
DEFAULT_CURRENCY: ${DEFAULT_CURRENCY:-USD}
GAUZY_GITHUB_CLIENT_ID: ${GAUZY_GITHUB_CLIENT_ID:-}
GAUZY_GITHUB_APP_NAME: ${GAUZY_GITHUB_APP_NAME:-}
GAUZY_GITHUB_REDIRECT_URL: ${GAUZY_GITHUB_REDIRECT_URL:-}
GAUZY_GITHUB_POST_INSTALL_URL: ${GAUZY_GITHUB_POST_INSTALL_URL:-}
GAUZY_GITHUB_APP_ID: ${GAUZY_GITHUB_APP_ID:-}
JITSU_BROWSER_URL: ${JITSU_BROWSER_URL:-}
JITSU_BROWSER_WRITE_KEY: ${JITSU_BROWSER_WRITE_KEY:-}
DEMO: 'true'
API_HOST: ${API_HOST:-api}
API_PORT: ${API_PORT:-3000}
entrypoint: './entrypoint.compose.sh'
command: ['nginx', '-g', 'daemon off;']
env_file:
- .env.compose
restart: on-failure
links:
- db:${DB_HOST:-db}
- api:${API_HOST:-api}
- cube:${CUBE_HOST:-cube}
- redis:${REDIS_HOST:-redis}
- minio:${MINIO_HOST:-minio}
- elasticsearch:${ES_HOST:-elasticsearch}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
minio:
condition: service_started
minio_create_buckets:
condition: service_started
elasticsearch:
condition: service_healthy
api:
condition: service_started
# volumes:
# - webapp_node_modules:/srv/gauzy/node_modules
ports:
- '4200:${UI_PORT:-4200}'
networks:
- overlay
volumes:
# webapp_node_modules:
# api_node_modules:
redis_data: {}
postgres_data: {}
elasticsearch_data: {}
minio_data: {}
cube_data: {}
certificates: {}
jitsu_workspace: {}
networks:
overlay:
driver: bridge