-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.cadvisor.yml
49 lines (42 loc) · 2.1 KB
/
docker-compose.cadvisor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
restart: always
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
privileged: true
devices:
- "/dev/kmsg:/dev/kmsg"
command: --url_base_prefix=/cadvisor
environment:
- CADVISOR_HEALTHCHECK_URL=http://localhost:8080/cadvisor/healthz
labels:
- "traefik.enable=true" # enable traefik
- "traefik.docker.network=" # put it in the same network as traefik
- "traefik.constraint-label=traefik-public" # assign the same label as traefik so it can be discovered
- "traefik.http.services.cadvisor-01-secured.loadbalancer.server.port=8080" # ask Traefik to search for port 8080
- "traefik.http.routers.cadvisor-01.service=cadvisor-01-secured"
- "traefik.http.routers.cadvisor-01.rule=Host(`cadvisor.moh.org.bw`) && PathPrefix(`/cadvisor`)"
- "traefik.http.routers.cadvisor-01.priority=20"
- "traefik.http.routers.cadvisor-01.entrypoints=websecure"
- "traefik.http.middlewares.def-cadvisor-01.headers.customrequestheaders.X-Forwarded-Server=host.example.com"
- "traefik.http.middlewares.def-cadvisor-01.headers.referrerPolicy=origin"
- "traefik.http.middlewares.def-cadvisor-01-auth.basicauth.users=USERNAME:PASSWORD"
- "traefik.http.routers.cadvisor-01.middlewares=https-redirect"
- "traefik.http.routers.cadvisor-01-secured.service=cadvisor-01-secured"
- "traefik.http.routers.cadvisor-01-secured.rule=Host(`host.example.com`) && PathPrefix(`/cadvisor`)"
- "traefik.http.routers.cadvisor-01-secured.priority=20"
- "traefik.http.routers.cadvisor-01-secured.entrypoints=https"
- "traefik.http.routers.cadvisor-01-secured.tls.certresolver=le-tls" # use the Let's Encrypt certificate resolver
- "traefik.http.routers.cadvisor-01-secured.middlewares=secHeaders@file,def-cadvisor-01-auth,def-cadvisor-01,def-compress"
networks:
- "traefik-public"
networks:
hie:
external: true
name: hie-botswana_hie