Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (72 sloc) 1.63 KB
version: '3.4'
services:
pg01:
image: postgres:12.0
environment:
- POSTGRES_USER=hsearch_demo
- POSTGRES_PASSWORD=hsearch_demo
- POSTGRES_DB=hsearch_demo
volumes:
- pgdata01:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- pgnet
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
environment:
- node.name=es01
- discovery.seed_hosts=es02
- cluster.initial_master_nodes=es01,es02
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata01:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 5s
timeout: 1s
retries: 3
start_period: 5s
ports:
- 9200:9200
networks:
- esnet
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
environment:
- node.name=es02
- discovery.seed_hosts=es01
- cluster.initial_master_nodes=es01,es02
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata02:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 5s
timeout: 1s
retries: 3
start_period: 5s
networks:
- esnet
volumes:
pgdata01:
driver: local
esdata01:
driver: local
esdata02:
driver: local
networks:
esnet:
pgnet:
You can’t perform that action at this time.