-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
54 lines (51 loc) · 1.47 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
version: '3.2'
services:
# recall to sudo sysctl -w vm.max_map_count=262144 on swarm nodes
elasticsearch:
image: agoryachev/docker-swarm-elasticsearch:5.4.0
ports:
- "9200:9200"
- "9300:9300"
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- backend
environment:
- SERVICE_NAME=${ELK_STACK:-elk}_elasticsearch
- ELASTICSEARCH_USERNAME=${ELKUSERNAME:-elastic}
- ELASTICSEARCH_PASSWORD=${ELKPASSWORD:-changeme}
- discovery.zen.minimum_master_nodes=1
- cluster.name=elasticsearch
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m -XX:-AssumeMP
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
# local test curl http://elastic:changeme@elasticsearch:9200/_cluster/health?wait_for_status=yellow&timeout=50s
# test: ["CMD", "curl", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s"]
# dig tasks.${SERVICE_NAME} +short
test: "curl --silent --fail localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s || exit 1"
interval: 1m30s
timeout: 50s
retries: 5
deploy:
resources:
limits:
memory: 1G
mode: global
update_config:
parallelism: 1
delay: 1m30s
restart_policy:
condition: on-failure
volumes:
esdata:
external: true
networks:
backend:
external: true