-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
131 lines (123 loc) · 3.84 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
version: '3.4'
services:
traefik:
image: traefik
container_name: traefik
ports:
- "7512:7512"
- "1883:1883"
command:
- --log.level=DEBUG
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --entrypoints.kuzzle_http.address=:7512
- --entrypoints.kuzzle_mqtt.address=:1883
- --entrypoints.global_http.address=:80
depends_on:
kuzzle:
condition: service_healthy
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
kuzzle-installer:
image: kuzzleio/kuzzle-runner:18
container_name: kuzzle-installer
command: bash -c "npm ci"
volumes:
- .:/var/app
kuzzle:
image: kuzzleio/kuzzle-runner:18
command: bash -c "npm run dev"
volumes:
- ".:/var/app"
- "./config/kuzzlerc:/var/app/.kuzzlerc"
cap_add:
- SYS_PTRACE
ulimits:
nofile: 65536
sysctls:
- net.core.somaxconn=8192
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7512/_publicApi"]
timeout: 1s
interval: 2s
retries: 10
depends_on:
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
kuzzle-installer:
condition: service_completed_successfully
labels:
- "traefik.enable=true"
# Kuzzle HTTP/WS
- "traefik.http.services.kuzzle_http.loadbalancer.server.port=7512"
- "traefik.http.services.kuzzle_http.loadbalancer.healthCheck.path=/_publicApi"
- "traefik.http.services.kuzzle_http.loadbalancer.healthCheck.interval=5s"
- "traefik.http.routers.kuzzle.entrypoints=kuzzle_http"
- "traefik.http.routers.kuzzle.rule=Host(`localhost`)"
- "traefik.http.routers.kuzzle.service=kuzzle_http"
# Kuzzle MQTT
- "traefik.tcp.services.kuzzle_mqtt.loadbalancer.server.port=1883"
- "traefik.tcp.routers.kuzzle.entrypoints=kuzzle_mqtt"
- "traefik.tcp.routers.kuzzle.rule=HostSNI(`*`)"
- "traefik.tcp.routers.kuzzle.service=kuzzle_mqtt"
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}
redis:
image: redis:6
container_name: kuzzle_redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
ports:
- "6379:6379"
elasticsearch:
image: kuzzleio/elasticsearch:7
container_name: kuzzle_elasticsearch
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 5s
timeout: 2s
retries: 15
ports:
- "9200:9200"
ulimits:
nofile: 65536
prometheus:
image: prom/prometheus
container_name: prometheus
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:9090/-/ready"]
timeout: 5s
interval: 2s
retries: 60
volumes:
- "./config/prometheus.yml:/etc/prometheus/prometheus.yml"
depends_on:
kuzzle:
condition: service_healthy
ports:
- "9090:9090"
grafana:
image: grafana/grafana
container_name: grafana
depends_on:
prometheus:
condition: service_healthy
volumes:
- "./config/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasource.yaml"
- "./config/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yaml"
- "./config/grafana/dashboards:/var/lib/grafana/dashboards"
ports:
- "3000:3000"