Ces deux fichiers doivent être dans le même répertoire.
version: "3.9"
services:
grafana:
image: grafana/grafana:latest
restart: always
container_name: grafana
volumes:
- ./config:/etc/grafana
- ./data:/var/lib/grafana
environment:
- GF_PANELS_DISABLE_SANITIZE_HTML=true
- GF_SERVER_DOMAIN=${URL}
- GF_SERVER_ROOT_URL=https://${URL}
- GF_INSTALL_PLUGINS=${PLUGINS}
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=${PLUGINS}
- GF_SECURITY_ADMIN_USER=${ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD}
## Optionnel : supprimer cette ligne et les commentaires seulement si le conteneur Autoheal est utilisé
# healthcheck:
# test: wget -nv -t1 --spider 'http://localhost:3000/'
# interval: 1m
# timeout: 30s
# retries: 3
networks:
- traefik-network
labels:
# - autoheal=true # Optionnel : supprimer ce message et le commentaire en début de ligne seulement si le conteneur Autoheal est utilisé
- traefik.enable=true
- traefik.docker.network=traefik-network
- traefik.http.routers.grafana.entrypoints=http
- traefik.http.routers.grafana.rule=Host(`$URL`)
- traefik.http.middlewares.grafana-https-redirect.redirectscheme.scheme=https
- traefik.http.routers.grafana.middlewares=grafana-https-redirect
- traefik.http.routers.grafana-secure.entrypoints=https
- traefik.http.routers.grafana-secure.rule=Host(`$URL`)
- traefik.http.routers.grafana-secure.tls=true
- traefik.http.services.grafana.loadbalancer.server.port=3000
volumes:
config:
data:
networks:
traefik-network:
external: true
URL="**********"
PLUGINS="alexanderzobnin-zabbix-app" # POUR UTILISER GRAFANA AVEC ZABBIX
UNSIGNED_PLUGINS="alexanderzobnin-zabbix-datasource" # POUR UTILISER GRAFANA AVEC ZABBIX
ADMIN_USER="**********"
ADMIN_PASSWORD="**********"