Difference between revisions of "Docker-compose.yml (Grafana)"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{lc}}
 +
* https://grafana.com/docs/grafana/latest/setup-grafana/installation/docker/
 +
* https://grafana.com/docs/grafana-cloud/quickstart/docker-compose-linux/
 +
  
  
 
 
   [[version]]: "[[3.7]]"
 
   [[version]]: "[[3.7]]"
 
   
 
   
Line 10: Line 13:
 
         ports:
 
         ports:
 
                 - "3000:3000"
 
                 - "3000:3000"
         restart: always
+
         [[environment:]]
 +
            [[GF_SECURITY_ADMIN_PASSWORD]]: CHANGEIT
 +
        [[restart:]] always
 
         volumes:
 
         volumes:
             - ./grafana_storage:/var/lib/grafana
+
             - ./grafana_storage:[[/var/lib/grafana]]
 
   
 
   
 
   [[Docker-compose: volumes|volumes]]:
 
   [[Docker-compose: volumes|volumes]]:
Line 20: Line 25:
  
  
 
+
Without [[environment:]]
 
   [[version]]: "[[3.7]]"
 
   [[version]]: "[[3.7]]"
 
   
 
   
   services:
+
   [[services:]]
 
     grafana:
 
     grafana:
 
         image: grafana/grafana:7.0.6
 
         image: grafana/grafana:7.0.6
Line 29: Line 34:
 
         ports:
 
         ports:
 
                 - "3000:3000"
 
                 - "3000:3000"
         environment:
+
         [[restart:]] always
            GF_SECURITY_ADMIN_PASSWORD: CHANGEIT
+
         [[volumes:]]
        restart: always
 
         volumes:
 
 
             - ./grafana_storage:/var/lib/grafana
 
             - ./grafana_storage:/var/lib/grafana
 
   
 
   
 
   [[Docker-compose: volumes|volumes]]:
 
   [[Docker-compose: volumes|volumes]]:
 
     grafana_storage:
 
     grafana_storage:
           driver: local
+
           [[driver:]] local
 
 
 
 
 
 
  
  
 
See also: https://towardsdatascience.com/get-system-metrics-for-5-min-with-docker-telegraf-influxdb-and-grafana-97cfd957f0ac
 
See also: https://towardsdatascience.com/get-system-metrics-for-5-min-with-docker-telegraf-influxdb-and-grafana-97cfd957f0ac
  
 
+
== Errors ==
 
  mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
 
  mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
  Solution: add <code>user: "$UID:$GID"</code><ref>https://community.grafana.com/t/new-docker-install-with-persistent-storage-permission-problem/10896/13</ref>
+
  Solution: add <code>[[user]]: "$UID:$GID"</code><ref>https://community.grafana.com/t/new-docker-install-with-persistent-storage-permission-problem/10896/13</ref>
  
 
== Related terms ==
 
== Related terms ==
Line 54: Line 54:
 
* [[Docker-compose.yml examples]]
 
* [[Docker-compose.yml examples]]
 
* [[Docker-compose: volumes]]
 
* [[Docker-compose: volumes]]
 +
* <code>[[docker volume ls]]</code>
 +
* <code>[[grafana-cli plugins install]]</code>
  
 
== See also ==
 
== See also ==
 
* {{grafana}}
 
* {{grafana}}
* {{docker-compose}}
 
  
  
 
[[Category:Docker]]
 
[[Category:Docker]]

Latest revision as of 08:10, 14 February 2023


 version: "3.7"

 services:
   grafana:
        image: grafana/grafana:7.0.6
        container_name: grafana
        ports:
                - "3000:3000"
        environment:
            GF_SECURITY_ADMIN_PASSWORD: CHANGEIT
        restart: always
        volumes:
           - ./grafana_storage:/var/lib/grafana

 volumes:
   grafana_storage:
          driver: local


Without environment:

 version: "3.7"

 services:
   grafana:
        image: grafana/grafana:7.0.6
        container_name: grafana
        ports:
                - "3000:3000"
        restart: always
        volumes:
           - ./grafana_storage:/var/lib/grafana

 volumes:
   grafana_storage:
          driver: local


See also: https://towardsdatascience.com/get-system-metrics-for-5-min-with-docker-telegraf-influxdb-and-grafana-97cfd957f0ac

Errors[edit]

mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
Solution: add user: "$UID:$GID"[1]

Related terms[edit]

See also[edit]

  • https://community.grafana.com/t/new-docker-install-with-persistent-storage-permission-problem/10896/13
  • Advertising: