17 lines
544 B
YAML
17 lines
544 B
YAML
version: '3'
|
|
services:
|
|
########## elasticsearc ##########
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
|
|
container_name: elasticsearch # 容器名
|
|
hostname: elasticsearch # 主机名
|
|
restart: unless-stopped # 容器停止时重新启动
|
|
environment:
|
|
- discovery.type=single-node
|
|
- ES_JAVA_OPTS=-Xms512m -Xmx512m
|
|
ports:
|
|
- 9200:9200
|
|
volumes:
|
|
- ../config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
|
network_mode: "host"
|