Created
September 17, 2018 14:13
-
-
Save jnovack/2f4a7d9aa8671dde93da1aaf9a3cc017 to your computer and use it in GitHub Desktop.
Docker Swarm ElasticSearch Cluster (Exposed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exposes the ElasticSearch cluster on :9200 | |
# of all Docker Swarm Nodes (poor man's clustering) | |
# [NSFW] X-Pack-Security Disabled, Kibana-Monitoring Enabled | |
version: '3.7' | |
services: | |
node: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.0 | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
environment: | |
- "cluster.name=docker-cluster" | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
- "xpack.security.enabled=false" | |
- "xpack.monitoring.collection.enabled=true" | |
- "es.enforce.bootstrap.checks" | |
- "network.publish_host=_eth0:ipv4_" | |
- discovery.zen.ping.unicast.hosts=tasks.node | |
- discovery.zen.minimum_master_nodes=2 | |
- "node.name={{ .Node.Hostname }}" | |
deploy: | |
mode: global | |
update_config: | |
parallelism: 1 | |
delay: 120s | |
restart_policy: | |
condition: on-failure | |
delay: 5s | |
max_attempts: 3 | |
window: 300s | |
volumes: | |
- esdata:/usr/share/elasticsearch/data | |
kibana: | |
image: docker.elastic.co/kibana/kibana:6.4.0 | |
ports: | |
- "5601:5601" | |
depends_on: | |
- node | |
environment: | |
ELASTICSEARCH_URL: 'http://es_node:9200' | |
deploy: | |
replicas: 1 | |
restart_policy: | |
condition: on-failure | |
delay: 5s | |
max_attempts: 3 | |
window: 300s | |
volumes: | |
esdata: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment