Created
August 27, 2017 23:26
-
-
Save melihovv/dd333f34ab4c8e7e32fe22dc69c3ce8b to your computer and use it in GitHub Desktop.
Docker-compose.yml for mysql, postgres, redis, elk, etc
This file contains hidden or 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
version: '3' | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
volumes: | |
- db_data:/var/lib/mysql/ | |
- /etc/localtime:/etc/localtime:ro | |
- ./mysql/conf.d/:/etc/mysql/conf.d/ | |
restart: always | |
environment: | |
MYSQL_ALLOW_EMPTY_PASSWORD: 1 | |
MYSQL_ROOT_PASSWORD: '' | |
MYSQL_DATABASE: db | |
MYSQL_USER: user | |
MYSQL_PASSWORD: pass | |
postgres: | |
image: postgres | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_PASSWORD: secret | |
volumes: | |
- postgres_data:/var/lib/postgresql/data | |
- /etc/localtime:/etc/localtime:ro | |
es: | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.2 | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms1g -Xmx1g" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- esdata2:/usr/share/elasticsearch/data | |
- /etc/localtime:/etc/localtime:ro | |
ports: | |
- 9200:9200 | |
kibana: | |
image: docker.elastic.co/kibana/kibana:5.5.2 | |
environment: | |
ELASTICSEARCH_URL: http://es:9200 | |
ELASTICSEARCH_USERNAME: elastic | |
ELASTICSEARCH_PASSWORD: changeme | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
ports: | |
- 5601:5601 | |
links: | |
- es | |
logstash: | |
image: docker.elastic.co/logstash/logstash:5.5.2 | |
volumes: | |
- ./logstash/cars.csv:/cars.csv | |
- ./logstash/pipelines/:/usr/share/logstash/pipeline/ | |
- /etc/localtime:/etc/localtime:ro | |
links: | |
- es | |
redis: | |
image: redis | |
volumes: | |
- /var/lib/redis/:/data/ | |
- /etc/localtime:/etc/localtime:ro | |
ports: | |
- 6379:6379 | |
volumes: | |
db_data: | |
postgres_data: | |
esdata: | |
driver: local | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment