From a1365c8a96b49d4041af51277031c0dc0dc204d4 Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 10 Oct 2019 11:49:53 +0200 Subject: grafana --- docker-compose.yml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 453e2ca..5b75a28 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,8 +72,8 @@ services: - "traefik.enable=true" - "traefik.http.routers.scoreboard.entrypoints=web" - "traefik.http.routers.scoreboard.rule=Host(`scoreboard.${HOSTNAME}`)" - #- "traefik.http.middlewares.scoreboard-https-redirect.redirectscheme.scheme=https" - #- "traefik.http.routers.scoreboard.middlewares=scoreboard-https-redirect" + - "traefik.http.middlewares.scoreboard-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.scoreboard.middlewares=scoreboard-https-redirect" - "traefik.http.routers.scoreboard-secure.entrypoints=websecure" - "traefik.http.routers.scoreboard-secure.rule=Host(`scoreboard.${HOSTNAME}`)" - "traefik.http.routers.scoreboard-secure.tls=true" @@ -90,7 +90,8 @@ services: command: - "--config.file=/etc/prometheus/prometheus.yml" volumes: - - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro + - "./prometheus.yml:/etc/prometheus/prometheus.yml:ro" + - "prometheus_data:/prometheus" ports: - "9090:9090" labels: @@ -108,7 +109,36 @@ services: networks: - circus + grafana: + image: "grafana/grafana" + container_name: "grafana" + volumes: + - "grafana_data:/var/lib/grafana" + environment: + - "GF_SERVER_ROOT_URL=http://grafana.docker.localhost:3000" + - "GF_SECURITY_ADMIN_PASSWORD=secret" + ports: + - "3000:3000" + labels: + - "traefik.enable=true" + - "traefik.http.routers.grafana.entrypoints=web" + - "traefik.http.routers.grafana.rule=Host(`grafana.${HOSTNAME}`)" + - "traefik.http.middlewares.grafana-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.grafana.middlewares=grafana-https-redirect" + - "traefik.http.routers.grafana-secure.entrypoints=websecure" + - "traefik.http.routers.grafana-secure.rule=Host(`grafana.${HOSTNAME}`)" + - "traefik.http.routers.grafana-secure.tls=true" + - "traefik.http.routers.grafana-secure.tls.certresolver=mytlschallenge" + - "traefik.http.routers.grafana-secure.service=grafana" + - "traefik.http.services.grafana.loadbalancer.server.port=3000" + networks: + - circus + networks: circus: external: name: circus + +volumes: + prometheus_data: {} + grafana_data: {} -- cgit 1.4.1