Skip to content

Instantly share code, notes, and snippets.

@aizatto
Last active June 14, 2018 22:38
Show Gist options
  • Save aizatto/bc10578ba4e7aca9a7e9013fb075bee3 to your computer and use it in GitHub Desktop.
Save aizatto/bc10578ba4e7aca9a7e9013fb075bee3 to your computer and use it in GitHub Desktop.
docker-compose.yml for MariaDB and Elasticsearch
# https://docs.docker.com/compose/overview/#variables-and-moving-a-composition-between-environments
version: '3'
services:
# https://hub.docker.com/_/mariadb/
database:
image: mariadb:10.3
environment:
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./tmp/mysql:/var/lib/mysql
ports:
- "3306:3306"
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.3
ports:
- "9200:9200"
volumes:
- ./tmp/elasticsearch:/usr/share/elasticsearch/data
- ./config/containers/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
xpack.security.enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment