From e13fff0f219c061af10cf450006edce53dcd63a3 Mon Sep 17 00:00:00 2001 From: Usman Ahmad <69509548+usmangt@users.noreply.github.com> Date: Fri, 28 Apr 2023 14:46:10 +0200 Subject: [PATCH] Update start-restart-grafana.md (#67455) * Update start-restart-grafana.md update the `docker-compose.yaml` file as it was not incomplete. Also remove the `grafana-piechart-panel` from the `GF_INSTALL_PLUGIN` as this plugin is available in the core and does not require to be installed separately. I tested the code and all looks good and also the backend logs look fine. * Update start-restart-grafana.md update the docker compose command instead of using the old docker-compose command * makes prettier --------- Co-authored-by: Chris Moyer --- .../setup-grafana/start-restart-grafana.md | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/sources/setup-grafana/start-restart-grafana.md b/docs/sources/setup-grafana/start-restart-grafana.md index b53f3fc93e6..1c39700b5e5 100644 --- a/docs/sources/setup-grafana/start-restart-grafana.md +++ b/docs/sources/setup-grafana/start-restart-grafana.md @@ -116,24 +116,32 @@ Alternatively, you can use the `docker compose restart` command to restart Grafa Configure your `docker-compose.yml` file. For example: ```bash -grafana: - image: grafana/grafana:latest - ports: - - "3000:3000" - environment: - - TERM=linux - - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-piechart-panel,grafana-polystat-panel +version: "3.8" +services: + grafana: + image: grafana/grafana:latest + container_name: grafana + restart: unless-stopped + environment: + - TERM=linux + - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-polystat-panel + ports: + - '3000:3000' + volumes: + - 'grafana_storage:/var/lib/grafana' +volumes: + grafana_storage: {} ``` Start the Grafana server: -`docker-compose up` +`docker compose up -d` -This starts the Grafana server along with the three plugins specified in the YAML file. +This starts the Grafana server container in detached mode along with the two plugins specified in the YAML file. To restart the running container, use this command: -`docker-compose restart grafana` +`docker compose restart grafana` ## Windows