Skip to content

Instantly share code, notes, and snippets.

@starkers
Created October 9, 2018 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starkers/df1f7a2b9ba08a25a2c207610f892e88 to your computer and use it in GitHub Desktop.
Save starkers/df1f7a2b9ba08a25a2c207610f892e88 to your computer and use it in GitHub Desktop.
sample traefik
---
version: '2'
services:
elasticsearch:
# slightly modified official image with data volume chmod fix
build:
context: ./elasticsearch_build
environment:
http.host: 0.0.0.0
transport.host: 127.0.0.1
ports:
- 9200:9200
labels:
traefik.port: "9200"
traefik.enable: "true"
traefik.backend: "elasticsearch"
traefik.frontend.rule: "Host:elasticsearch.localhost"
kibana:
# https://www.docker.elastic.co/ to see image:tag options
image: docker.elastic.co/kibana/kibana:6.3.1
# environment:
# elasticsearch.url: "http://elasticsearch:9200"
depends_on:
- elasticsearch
labels:
traefik.port: "5601"
traefik.enable: "true"
traefik.backend: "kibana"
traefik.frontend.rule: "Host:kibana.localhost"
ports:
- 5601:5601
traefik:
image: traefik:v1.6.4-alpine
restart: always
command:
- -c /dev/null
- --api
- --docker
# - --logLevel=DEBUG
- --docker.domain=localhost
- --accesslog.filepath=/logs/access.json
- --accesslog.format=json
ports:
- "80:80"
- "8080:8080"
volumes:
- "./traefik_logs/:/logs/"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami1:
image: emilevauge/whoami
labels:
traefik.backend: "whoami"
traefik.frontend.rule: "Host:whoami.localhost"
whoami2:
image: emilevauge/whoami
labels:
traefik.backend: "whoami"
traefik.frontend.rule: "Host:whoami.localhost"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment