From ba86c60a1e83ca8a0df8c749ada3933f74c77eb6 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 28 Apr 2023 08:52:11 -0400 Subject: [PATCH] [v9.5.x] Update start-restart-grafana.md (#67506) 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 (cherry picked from commit e13fff0f219c061af10cf450006edce53dcd63a3) Co-authored-by: Usman Ahmad <69509548+usmangt@users.noreply.github.com> --- .../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 798b1cf6684..ef017f4fcb2 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