From 7a01fad193f94b34ac7c4e10de82bd12047ca328 Mon Sep 17 00:00:00 2001 From: Emile Date: Wed, 9 Oct 2019 19:48:57 +0200 Subject: added a prometheus container --- docker-compose.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3da06b4..9871f1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,6 +82,31 @@ services: networks: - circus + prometheus: + image: "prom/prometheus:latest" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + command: + - "--config.file=/etc/prometheus/prometheus.yml" + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro + ports: + - "9090:9090" + labels: + - "traefik.enable=true" + - "traefik.http.routers.prometheus.entrypoints=web" + - "traefik.http.routers.prometheus.rule=Host(`prometheus.${HOSTNAME}`)" + - "traefik.http.middlewares.prometheus-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.prometheus.middlewares=prometheus-https-redirect" + - "traefik.http.routers.prometheus-secure.entrypoints=websecure" + - "traefik.http.routers.prometheus-secure.rule=Host(`prometheus.${HOSTNAME}`)" + - "traefik.http.routers.prometheus-secure.tls=true" + - "traefik.http.routers.prometheus-secure.tls.certresolver=mytlschallenge" + - "traefik.http.routers.prometheus-secure.service=prometheus" + - "traefik.http.services.prometheus.loadbalancer.server.port=9090" + networks: + - circus + networks: circus: external: -- cgit 1.4.1