about summary refs log tree commit diff
path: root/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml25
1 files changed, 25 insertions, 0 deletions
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: