File tree Expand file tree Collapse file tree 1 file changed +21
-12
lines changed Expand file tree Collapse file tree 1 file changed +21
-12
lines changed Original file line number Diff line number Diff line change 1
1
# Elasticsearch 知识
2
2
3
- ## Docker 部署
3
+ ## Docker 单节点部署
4
4
5
+ - 注意:docker 版本下 client.transport.sniff = true 是无效的。
5
6
- ` vim ~/elasticsearch-5.6.8-docker.yml `
6
7
- 启动:` docker-compose -f ~/elasticsearch-5.6.8-docker.yml -p elasticsearch_5.6.8 up -d `
7
8
8
9
```
9
- version: "3"
10
-
10
+ version: '3'
11
11
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
17
15
environment:
18
- - 'http.host=0.0.0.0'
19
- - 'transport.host=127.0.0.1'
20
16
- "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
21
28
ports:
22
- - " 9200:9200"
23
- - " 9300:9300"
29
+ - 9200:9200
30
+ - 9300:9300
24
31
volumes:
25
32
- /data/docker/elasticsearch/data:/usr/share/elasticsearch/data
33
+
26
34
```
27
35
36
+
28
37
-------------------------------------------------------------------
29
38
30
39
You can’t perform that action at this time.
0 commit comments