-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-elasticsearch.yml
43 lines (39 loc) · 1.12 KB
/
docker-compose-elasticsearch.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
version: '2'
networks:
default:
external:
name: ${DC_NETWORK}
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
container_name: ${DC_PREFIX}-elasticsearch
command:
- /bin/bash
- -c
- |
if [ ! -z "$http_proxy" ]; then
host=$${http_proxy##*//};
host=$${host%%:*};
port=$${http_proxy##*:};
(echo -e "cluster.name: \"matchid-cluster\"\nnetwork.host: 0.0.0.0\ns3.client.default.proxy.host: $${host}\ns3.client.default.proxy.port: $${port}" > /usr/share/elasticsearch/config/elasticsearch.yml);
fi;
exec /usr/local/bin/docker-entrypoint.sh elasticsearch
environment:
- bootstrap.memory_lock=true
- ES_JAVA_OPTS
- http_proxy
- https_proxy
- no_proxy
- discovery.type=single-node
- xpack.security.enabled=false
- LOG4J_FORMAT_MSG_NO_LOOKUPS=true
ulimits:
memlock:
soft: -1
hard: -1
# mem_limit: %MM
volumes:
- ${ES_DATA}/node1:/usr/share/elasticsearch/data
# ports:
# - 9200:9200
restart: always