From 3a58ec570d5f161b6bc726c6fd2c0e0859195cba Mon Sep 17 00:00:00 2001 From: Darren Janeczek Date: Wed, 1 Apr 2026 18:31:21 -0400 Subject: [PATCH] fix(create-plugin): make Grafana host port configurable via GRAFANA_PORT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the hardcoded 3000:3000/tcp port mapping in docker-compose-base.yaml with ${GRAFANA_PORT:-3000}:3000/tcp so plugin developers can run multiple local Grafana instances simultaneously on different ports. When a plugin's docker-compose.yaml extends docker-compose-base.yaml and also declares a ports entry, Docker Compose merges the two lists. With the base hardcoded at 3000:3000/tcp, setting GRAFANA_PORT=3001 in the extending file results in both 3000:3000 and 3001:3000 being bound — the 3000 binding fails if another container already holds that port. Using the same variable in the base means both entries resolve identically and Docker deduplicates them. Defaults to 3000 when unset, so existing .env files need no changes. --- .../templates/common/.config/docker-compose-base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-plugin/templates/common/.config/docker-compose-base.yaml b/packages/create-plugin/templates/common/.config/docker-compose-base.yaml index 6306eb6eeb..7c8a24288a 100644 --- a/packages/create-plugin/templates/common/.config/docker-compose-base.yaml +++ b/packages/create-plugin/templates/common/.config/docker-compose-base.yaml @@ -11,7 +11,7 @@ services: development: ${DEVELOPMENT:-false} anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true} ports: - - 3000:3000/tcp + - ${GRAFANA_PORT:-3000}:3000/tcp {{#if hasBackend}} - 2345:2345/tcp # delve security_opt: