Skip to content

Instantly share code, notes, and snippets.

@svalo
Created January 17, 2019 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svalo/916f1f2cf0d0acd41bc4b8e7b055fcc7 to your computer and use it in GitHub Desktop.
Save svalo/916f1f2cf0d0acd41bc4b8e7b055fcc7 to your computer and use it in GitHub Desktop.
Docker compose for 3 elastic data node and 1 master + fess node
version: '2.2'
services:
elasticsearch1:
build: elastic-img
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster-for-fess
- node.name=node1
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.zen.ping.unicast.hosts=fess
- discovery.zen.minimum_master_nodes=1
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=2gb
- cluster.routing.allocation.disk.watermark.high=1gb
- cluster.routing.allocation.disk.watermark.flood_stage=512mb
- configsync.config_path=/var/lib/elasticsearch/config/
- node.master=false
- node.ml=false
- xpack.ml.enabled=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /usr/share/elasticsearch/data
- /var/lib/elasticsearch/config
networks:
- esnet
elasticsearch2:
build: elastic-img
container_name: elasticsearch2
environment:
- node.name=node2
- cluster.name=docker-cluster-for-fess
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.zen.ping.unicast.hosts=fess
- discovery.zen.minimum_master_nodes=1
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=2gb
- cluster.routing.allocation.disk.watermark.high=1gb
- cluster.routing.allocation.disk.watermark.flood_stage=512mb
- configsync.config_path=/var/lib/elasticsearch/config/
- node.master=false
- node.ml=false
- xpack.ml.enabled=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /usr/share/elasticsearch/data
- /var/lib/elasticsearch/config
networks:
- esnet
elasticsearch3:
build: elastic-img
container_name: elasticsearch3
environment:
- node.name=node3
- discovery.zen.ping.unicast.hosts=fess
- discovery.zen.minimum_master_nodes=1
- cluster.name=docker-cluster-for-fess
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=2gb
- cluster.routing.allocation.disk.watermark.high=1gb
- cluster.routing.allocation.disk.watermark.flood_stage=512mb
- configsync.config_path=/var/lib/elasticsearch/config/
- node.master=false
- node.ml=false
- xpack.ml.enabled=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /usr/share/elasticsearch/data
- /var/lib/elasticsearch/config
networks:
- esnet
fess:
build: fess-img
container_name: fess
ports:
- 8080:8080
networks:
- esnet
networks:
esnet:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment