-
-
Save ronnycoding/06d74678fbe9386bc583a183986a2d2a to your computer and use it in GitHub Desktop.
Elasticsearch and Kibana using docker-compose (v3)
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
# docker-compose build && docker-compose up -d | |
version: "3.2" | |
volumes: | |
elasticsearch_data: | |
driver: local | |
kibana_data: | |
driver: local | |
services: | |
# Access api endpoint at http://localhost:9200 | |
elasticsearch: | |
container_name: elasticsearch | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.3 | |
ports: | |
- "9200:9200" | |
volumes: | |
- elasticsearch_data:/usr/share/elasticsearch/data | |
- ./elasticsearch.yml:/conf/elasticsearch.yml | |
# logging: | |
# driver: none | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
- xpack.security.enabled=false | |
- xpack.watcher.enabled=false | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
# deploy: | |
# resources: | |
# limits: | |
# memory: 1g | |
restart: always | |
# Access Kibana at http://localhost:5601 without Traefik | |
# Access Kibana at http://kibana.test (if using Traefik) | |
kibana: | |
container_name: kibana | |
image: docker.elastic.co/kibana/kibana:5.4.3 # must match elasticsearch image | |
ports: | |
- 5611:5601 | |
volumes: | |
- kibana_data:/usr/share/kibana/data | |
labels: # used for Traefik dynamic configuration | |
- traefik.enable=true | |
- traefik.backend=kibana | |
- traefik.frontend.rule=Host:kibana.test | |
- traefik.port=5601 | |
depends_on: | |
- elasticsearch | |
environment: | |
- ELASTICSEARCH_URL=http://elasticsearch:9200 | |
- xpack.security.enabled=false | |
# logging: | |
# driver: none | |
restart: always | |
# Reverse proxy for BEL API and other web endpoints | |
# Access mgmt interface at http://localhost:8088 | |
# have to add kibana.test to /etc/hosts or /windows/system32/drivers/etc/hosts | |
traefik: | |
image: traefik:latest | |
container_name: traefik | |
ports: | |
- "80:80" | |
- "443:443" | |
- "8088:8088" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./traefik.toml:/traefik.toml |
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
defaultEntryPoints = ["http"] | |
# logLevel = "DEBUG" | |
[web] | |
address = ":8088" | |
[web.statistics] | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
################################################################ | |
# Docker configuration backend | |
################################################################ | |
[docker] | |
endpoint = "unix:///var/run/docker.sock" | |
domain = "docker.localhost" | |
watch = true | |
# Expose containers by default in traefik | |
exposedbydefault = false | |
# Use Swarm Mode services as data provider | |
swarmmode = false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment