Set local only access for Prometheus and Traefik
This commit is contained in:
parent
8a9dea2ec8
commit
274d8736cb
@ -2,3 +2,4 @@ prom_name: prometheus
|
|||||||
grafana_name: grafana
|
grafana_name: grafana
|
||||||
prom_root: "/opt/{{ prom_name }}"
|
prom_root: "/opt/{{ prom_name }}"
|
||||||
grafana_root: "/opt/{{ prom_name }}/grafana"
|
grafana_root: "/opt/{{ prom_name }}/grafana"
|
||||||
|
traefik_localonly: "192.168.1.0/24"
|
||||||
|
@ -44,6 +44,9 @@
|
|||||||
labels:
|
labels:
|
||||||
traefik.http.routers.prometheus.rule: "Host(`{{ prom_domain }}`)"
|
traefik.http.routers.prometheus.rule: "Host(`{{ prom_domain }}`)"
|
||||||
traefik.http.routers.prometheus.entrypoints: websecure
|
traefik.http.routers.prometheus.entrypoints: websecure
|
||||||
|
traefik.http.routers.prometheus.middlewares: "securehttps@file,localonly"
|
||||||
|
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
|
||||||
|
traefik.http.middlewares.localonly.ipwhitelist.sourcerange: "{{ traefik_localonly }}"
|
||||||
traefik.docker.network: traefik
|
traefik.docker.network: traefik
|
||||||
traefik.enable: "true"
|
traefik.enable: "true"
|
||||||
|
|
||||||
|
@ -35,8 +35,9 @@
|
|||||||
labels:
|
labels:
|
||||||
traefik.http.routers.traefik.rule: "Host(`{{ traefik_domain }}`)"
|
traefik.http.routers.traefik.rule: "Host(`{{ traefik_domain }}`)"
|
||||||
traefik.http.middlewares.auth.basicauth.users: "{{ traefik_auth }}"
|
traefik.http.middlewares.auth.basicauth.users: "{{ traefik_auth }}"
|
||||||
|
traefik.http.middlewares.localonly.ipwhitelist.sourcerange: "{{ traefik_localonly }}"
|
||||||
traefik.http.routers.traefik.tls.certresolver: letsencrypt
|
traefik.http.routers.traefik.tls.certresolver: letsencrypt
|
||||||
traefik.http.routers.traefik.middlewares: "securehttps@file,auth@docker"
|
traefik.http.routers.traefik.middlewares: "securehttps@file,auth@docker,localonly"
|
||||||
traefik.http.routers.traefik.service: "api@internal"
|
traefik.http.routers.traefik.service: "api@internal"
|
||||||
traefik.http.routers.traefik.entrypoints: websecure
|
traefik.http.routers.traefik.entrypoints: websecure
|
||||||
traefik.http.routers.traefik.tls: "true"
|
traefik.http.routers.traefik.tls: "true"
|
||||||
|
Loading…
Reference in New Issue
Block a user