docker/elastic/docker-compose.yml

54 lines
1.6 KiB
YAML
Raw Normal View History

2021-05-09 22:07:17 +02:00
version: "3.8"
services:
elasticsearch:
2021-06-29 12:10:12 +02:00
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
2021-05-09 22:07:17 +02:00
hostname: ${CN}
restart: unless-stopped
environment:
- node.name=es01
- discovery.type=single-node
# - bootstrap.memory_lock=true
2021-06-10 14:51:27 +02:00
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
2021-05-09 22:07:17 +02:00
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ${DATA_PATH}/es/es01/data:/usr/share/elasticsearch/data
- ${DATA_PATH}/es/es01/snapshots:/usr/share/elasticsearch/snapshots
- ${DATA_PATH}/es/es01/config:/usr/share/elasticsearch/config
ports:
- 9200:9200
labels:
- "co.elastic.logs/module=elasticsearch"
kibana:
2021-06-29 12:10:12 +02:00
image: docker.elastic.co/kibana/kibana:7.13.0
2021-05-09 22:07:17 +02:00
restart: unless-stopped
networks:
- proxy
- default
links:
- "elasticsearch:${CN}"
expose:
- 5601
volumes:
- ${DATA_PATH}/kb/config:/usr/share/kibana/config
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.middlewares.kb-redirect-websecure.redirectscheme.scheme=https"
- "traefik.http.routers.kb-http.middlewares=kb-redirect-websecure"
- "traefik.http.routers.kb-http.rule=Host(`${CN}`)"
- "traefik.http.routers.kb-http.entrypoints=web"
- "traefik.http.routers.kb-https.rule=Host(`${CN}`)"
- "traefik.http.routers.kb-https.entrypoints=websecure"
- "traefik.http.routers.kb-https.tls=true"
- "traefik.http.routers.kb-https.tls.certresolver=myhttpchallenge"
- "co.elastic.logs/module=kibana"
networks:
proxy:
external: true