Skip to content

Commit 6b4f01a

Browse files
author
zhang
committed
2019-05-13
1 parent d206847 commit 6b4f01a

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

markdown-file/Elasticsearch-Base.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,39 @@
11
# Elasticsearch 知识
22

3-
## Docker 部署
3+
## Docker 单节点部署
44

5+
- 注意:docker 版本下 client.transport.sniff = true 是无效的。
56
- `vim ~/elasticsearch-5.6.8-docker.yml`
67
- 启动:`docker-compose -f ~/elasticsearch-5.6.8-docker.yml -p elasticsearch_5.6.8 up -d`
78

89
```
9-
version: "3"
10-
10+
version: '3'
1111
services:
12-
elasticsearch:
13-
image: elasticsearch:5.6.8
14-
restart: always
15-
container_name: elasticsearch
16-
hostname: elasticsearch
12+
elasticsearch1:
13+
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.8
14+
container_name: elasticsearch1
1715
environment:
18-
- 'http.host=0.0.0.0'
19-
- 'transport.host=127.0.0.1'
2016
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
17+
- "cluster.name=elasticsearch"
18+
- "network.host=0.0.0.0"
19+
- "http.host=0.0.0.0"
20+
- "xpack.security.enabled=false"
21+
ulimits:
22+
memlock:
23+
soft: -1
24+
hard: -1
25+
nofile:
26+
soft: 65536
27+
hard: 65536
2128
ports:
22-
- "9200:9200"
23-
- "9300:9300"
29+
- 9200:9200
30+
- 9300:9300
2431
volumes:
2532
- /data/docker/elasticsearch/data:/usr/share/elasticsearch/data
33+
2634
```
2735

36+
2837
-------------------------------------------------------------------
2938

3039

0 commit comments

Comments
 (0)