From c090d3d232dce7439a28e9714f5c9ae9e1df77c6 Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Thu, 2 Feb 2023 10:27:03 +0100 Subject: [PATCH 1/2] default to the grafana-enterprise docker image and adding a possibility to configure this value from outside the .config folder. --- .../templates/common/.config/Dockerfile | 3 ++- .../templates/common/.config/README.md | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/create-plugin/templates/common/.config/Dockerfile b/packages/create-plugin/templates/common/.config/Dockerfile index 2441df1e8..35d89bd1c 100644 --- a/packages/create-plugin/templates/common/.config/Dockerfile +++ b/packages/create-plugin/templates/common/.config/Dockerfile @@ -1,6 +1,7 @@ ARG grafana_version=latest +ARG grafana_image=grafana-enterprise -FROM grafana/grafana:${grafana_version} +FROM grafana/${grafana_image}:${grafana_version} # Make it as simple as possible to access the grafana instance for development purposes # Do NOT enable these settings in a public facing / production grafana instance diff --git a/packages/create-plugin/templates/common/.config/README.md b/packages/create-plugin/templates/common/.config/README.md index 18a469e63..d3d6b5502 100644 --- a/packages/create-plugin/templates/common/.config/README.md +++ b/packages/create-plugin/templates/common/.config/README.md @@ -139,3 +139,26 @@ We need to update the `scripts` in the `package.json` to use the extended Webpac -"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development", +"dev": "webpack -w -c ./webpack.config.ts --env development", ``` + +### Configure grafana image to use when running docker + +By default `grafana-enterprise` will be used as the docker image for all docker related commands. If you want to override this behaviour simply alter the `docker-compose.yaml` by adding the following build arg `grafana_image`. + +**Example:** + +```yaml +version: '3.7' + +services: + grafana: + container_name: 'myorg-basic-app' + build: + context: ./.config + args: + grafana_version: ${GRAFANA_VERSION:-9.1.2} + grafana_image: ${GRAFANA_IMAGE:-grafana} +``` + +In this example we are assigning the environment variable `GRAFANA_IMAGE` to the build arg `grafana_image` with a default value of `grafana`. This will give you the possibility to set the value while running the docker-compose commands which might be convinent in some scenarios. + +--- \ No newline at end of file From f95c2c83cdb8953565ab7e0e1ac2fa2002894f1c Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Thu, 2 Feb 2023 12:23:20 +0100 Subject: [PATCH 2/2] move the docs to the documentation page. --- docusaurus/docs/advanced-configuration.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docusaurus/docs/advanced-configuration.md b/docusaurus/docs/advanced-configuration.md index 533d49a0c..b8e3a7471 100644 --- a/docusaurus/docs/advanced-configuration.md +++ b/docusaurus/docs/advanced-configuration.md @@ -146,3 +146,26 @@ We need to update the `scripts` in the `package.json` to use the extended Webpac -"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development", +"dev": "webpack -w -c ./webpack.config.ts --env development", ``` + +### Configure grafana image to use when running docker + +By default `grafana-enterprise` will be used as the docker image for all docker related commands. If you want to override this behaviour simply alter the `docker-compose.yaml` by adding the following build arg `grafana_image`. + +**Example:** + +```yaml +version: '3.7' + +services: + grafana: + container_name: 'myorg-basic-app' + build: + context: ./.config + args: + grafana_version: ${GRAFANA_VERSION:-9.1.2} + grafana_image: ${GRAFANA_IMAGE:-grafana} +``` + +In this example we are assigning the environment variable `GRAFANA_IMAGE` to the build arg `grafana_image` with a default value of `grafana`. This will give you the possibility to set the value while running the docker-compose commands which might be convinent in some scenarios. + +--- \ No newline at end of file