forked from kuzzleio/kuzzle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (112 loc) · 3.29 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
version: '3.4'
x-kuzzle-config: &kuzzle-config
image: kuzzleio/core-dev:2
command: sh -c 'chmod 755 /run-dev.sh && /run-dev.sh'
volumes:
- '.:/var/app'
- './docker/scripts/run-dev.sh:/run-dev.sh'
- './docker/fixtures:/fixtures'
cap_add:
- SYS_PTRACE
ulimits:
nofile: 65536
sysctls:
- net.core.somaxconn=8192
depends_on:
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
environment:
- kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
- kuzzle_services__storageEngine__commonMapping__dynamic=true
- kuzzle_services__internalCache__node__host=redis
- kuzzle_services__memoryStorage__node__host=redis
- kuzzle_server__protocols__mqtt__enabled=true
- kuzzle_server__protocols__mqtt__developmentMode=false
- kuzzle_limits__loginsPerSecond=50
- NODE_ENV=${NODE_ENV:-development}
- DEBUG=${DEBUG:-kuzzle:*,-kuzzle:network:protocols:websocket,-kuzzle:events}
# - DEBUG=${DEBUG:-none}
- DEBUG_DEPTH=${DEBUG_DEPTH:-0}
- DEBUG_MAX_ARRAY_LENGTH=${DEBUG_MAX_ARRAY:-100}
- DEBUG_EXPAND=${DEBUG_EXPAND:-off}
- DEBUG_SHOW_HIDDEN={$DEBUG_SHOW_HIDDEN:-on}
- DEBUG_COLORS=${DEBUG_COLORS:-on}
- KUZZLE_VAULT_KEY=${KUZZLE_VAULT_KEY:-secret-password}
- KUZZLE_SECRETS_FILE=${KUZZLE_SECRETS_FILE:-/var/app/features/fixtures/secrets.enc.json}
# Variables used by the development scripts
- NODE_12_VERSION=12.20.0
- NODE_14_VERSION=14.17.0
- WITHOUT_KUZZLE # Run only Elasticsearch and Redis
- REBUILD # Force a rebuild of npm modules
services:
nginx:
image: nginx:1.19-alpine
container_name: kuzzle_nginx
depends_on:
- kuzzle_node_1
- kuzzle_node_2
- kuzzle_node_3
ports:
- '7512:7512'
volumes:
- ./docker/nginx-dev:/etc/nginx/conf.d
kuzzle_node_1:
<<: *kuzzle-config
container_name: kuzzle_node_1
ports:
- '17510:7512' # Kuzzle API port
- '1883:1883' # Kuzzle MQTT port
- '9229:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
timeout: 1s
interval: 2s
retries: 10
kuzzle_node_2:
<<: *kuzzle-config
container_name: kuzzle_node_2
ports:
- '17511:7512' # Kuzzle API port
- '11883:1883' # Kuzzle MQTT port
- '9230:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
timeout: 1s
interval: 2s
retries: 10
kuzzle_node_3:
<<: *kuzzle-config
container_name: kuzzle_node_3
ports:
- '17512:7512' # Kuzzle API port
- '11884:1883' # Kuzzle MQTT port
- '9231:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
timeout: 1s
interval: 2s
retries: 10
redis:
image: redis:6
container_name: kuzzle_redis
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 1s
timeout: 3s
retries: 30
elasticsearch:
image: kuzzleio/elasticsearch:7
container_name: kuzzle_elasticsearch
ports:
- '9200:9200'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9200']
interval: 2s
timeout: 2s
retries: 10
ulimits:
nofile: 65536