elk-docker
elk-docker copied to clipboard
Add sample docker-compose.yml with persistance + traefik configuration
Hey, Lovely Repository!
I've been using the following docker compose for a quick and easy elk deployment with kibana proxied through traefik with basic auth, I thought It could be of use for future users!
version: "3.7"
services:
elk:
image: sebp/elk
ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
restart: always
container_name: elkstack
hostname: elk
volumes:
- elk-data:/var/lib/elasticsearch
labels:
- "traefik.enable=true"
- "traefik.http.routers.elk.rule=Host(`kibana.DOMAIN.COM`)"
- "traefik.http.routers.elk.entrypoints=web"
- "traefik.http.services.elk.loadbalancer.server.port=5601"
- "traefik.http.routers.elk.service=elk"
- "traefik.http.middlewares.test-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"
- "traefik.http.routers.elk.middlewares=test-auth"
networks:
default:
external:
name: traefik_net
volumes:
elk-data:
Many thanks for the contribution, I’ll add a reference to your sample configuration file when I next update the documentation, for other traefik users!