29 lines
718 B
YAML
29 lines
718 B
YAML
services:
|
|
search:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
|
|
container_name: elasticsearch
|
|
hostname: search
|
|
restart: always
|
|
environment:
|
|
- http.host=0.0.0.0
|
|
- transport.host=localhost
|
|
- network.host=0.0.0.0
|
|
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512m
|
|
networks:
|
|
- backend
|
|
volumes:
|
|
- /root/elasticsearch/data/es_data:/var/lib/elasticsearch/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
networks:
|
|
backend:
|
|
external: true
|