Docker ElasticSearch
###########################
# ELK SERVICES NODE 1
###########################
els1:
image: docker.elastic.co/elasticsearch/${ELK_VERSION}
restart: always
healthcheck:
start_period: 60ms
timeout: 130ms
interval: 30ms
test: ifconfig | grep broadcast && clear
ports:
- 9200:9200
env_file: .env
environment:
- node.name=els1
- cluster.name=els-docker-cluster
- cluster.initial_master_nodes=els1,els2,els3
- discovery.seed_hosts=els2,els3
- discovery.zen.minimum_master_nodes=2
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- els1-data:/usr/share/elasticsearch/data
networks:
- node_networks
###########################
# ELK SERVICES NODE 2
###########################
els2:
image: docker.elastic.co/elasticsearch/${ELK_VERSION}
restart: always
healthcheck:
start_period: 60ms
timeout: 130ms
interval: 30ms
test: ifconfig | grep broadcast && clear
ports:
- 9300:9200
env_file: .env
environment:
- node.name=els2
- cluster.name=els-docker-cluster
- cluster.initial_master_nodes=els1,els2,els3
- discovery.seed_hosts=els1,els3
- discovery.zen.minimum_master_nodes=2
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- els2-data:/usr/share/elasticsearch/data
networks:
- node_networks
###########################
# ELK SERVICES NODE 3
###########################
els3:
image: docker.elastic.co/elasticsearch/${ELK_VERSION}
restart: always
healthcheck:
start_period: 60ms
timeout: 130ms
interval: 30ms
test: ifconfig | grep broadcast && clear
ports:
- 9400:9200
env_file: .env
environment:
- node.name=els3
- cluster.name=els-docker-cluster
- cluster.initial_master_nodes=els1,els2,els3
- discovery.seed_hosts=els1,els2
- discovery.zen.minimum_master_nodes=2
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- els3-data:/usr/share/elasticsearch/data
networks:
- node_networks
Restu Wahyu Saputra