Skip to content

Instantly share code, notes, and snippets.

@shleeable
Created July 17, 2024 09:09
Show Gist options
  • Save shleeable/6566870801d27b22ad67114cbd629ce5 to your computer and use it in GitHub Desktop.
Save shleeable/6566870801d27b22ad67114cbd629ce5 to your computer and use it in GitHub Desktop.
services:
es1:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Des.enforce.bootstrap.checks=true"
- "xpack.license.self_generated.type=basic"
- "xpack.security.enabled=false"
- "xpack.watcher.enabled=false"
- "xpack.graph.enabled=false"
- "xpack.ml.enabled=false"
- "bootstrap.memory_lock=true"
- "cluster.name=es-mastodon"
- "discovery.type=single-node"
- "thread_pool.write.queue_size=1000"
- "ELASTIC_PASSWORD=Theodore"
networks:
- external_network
- internal_network
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
volumes:
- ./elasticsearch1:/usr/share/elasticsearch/data
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- '9200:9200'
es2:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Des.enforce.bootstrap.checks=true"
- "xpack.license.self_generated.type=basic"
- "xpack.security.enabled=false"
- "xpack.watcher.enabled=false"
- "xpack.graph.enabled=false"
- "xpack.ml.enabled=false"
- "bootstrap.memory_lock=true"
- "cluster.name=es-mastodon"
- "discovery.type=single-node"
- "thread_pool.write.queue_size=1000"
- "ELASTIC_PASSWORD=Preston"
networks:
- external_network
- internal_network
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
volumes:
- ./elasticsearch2:/usr/share/elasticsearch/data
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- '9202:9200'
networks:
external_network:
internal_network:
internal: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment