From 0acb6ee2715fa8104a1cb827c3e8cd7a138b39cd Mon Sep 17 00:00:00 2001 From: Alexandre Chevalier Date: Sun, 15 Feb 2026 13:59:48 +0100 Subject: [PATCH] grafana fonctionne dans le compose --- ansible/files/dockercompose/docker-compose.yml | 14 ++++++-------- ansible/files/dockerfiles/grafana/Dockerfile | 5 ----- 2 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 ansible/files/dockerfiles/grafana/Dockerfile diff --git a/ansible/files/dockercompose/docker-compose.yml b/ansible/files/dockercompose/docker-compose.yml index 3095654..ba8dd11 100644 --- a/ansible/files/dockercompose/docker-compose.yml +++ b/ansible/files/dockercompose/docker-compose.yml @@ -76,12 +76,11 @@ services: - app-network grafana: -# build: -# context: .. -# dockerfile: dockerfiles/grafana/Dockerfile image: grafana/grafana:12.3 container_name: grafana - restart: unless-stopped + ports: + - "3000:3000" + #restart: unless-stopped volumes: - grafana-data:/var/lib/grafana - ../grafana/provisioning:/etc/grafana/provisioning @@ -90,7 +89,7 @@ services: environment: - GF_SECURITY_ADMIN_USER=tlc - GF_SECURITY_ADMIN_PASSWORD=tlc - - GF_INSTALL_PLUGINS=grafana-munin-datasource # Telechargement du plugin via var d'env + - GF_PLUGINS_PREINSTALL=grafana-munin-datasource # Telechargement du plugin via var d'env networks: - app-network @@ -127,8 +126,7 @@ services: networks: # Declare the network to be used by the services app-network: # Is a user-defined network - #external: false # If true, Docker Compose will look for an existing network with the same name and use it. If false or not specified, Docker Compose will create a new network. name: app-network #Name of the network (optional, Docker Compose will generate one if not provided) -volumes : - grafana-data: \ No newline at end of file +volumes : # Declare the volume to be used by the Grafana service (NE PAS SUPPRIMER !!) + grafana-data: # Name of the volume \ No newline at end of file diff --git a/ansible/files/dockerfiles/grafana/Dockerfile b/ansible/files/dockerfiles/grafana/Dockerfile deleted file mode 100644 index a90c6df..0000000 --- a/ansible/files/dockerfiles/grafana/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM grafana/grafana:12.3 - -USER root -RUN grafana-cli plugins install grafana-munin-datasource -USER grafana \ No newline at end of file