From 93f5b572bfabf26b71da8c652a66cf6e860ed477 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Thu, 19 Sep 2024 09:40:59 -0700 Subject: [PATCH] makefile examples --- Makefile | 9 +++++---- contrib/localnet/docker-compose.yml | 3 ++- contrib/localnet/grafana/grafana.ini | 5 +++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 contrib/localnet/grafana/grafana.ini diff --git a/Makefile b/Makefile index 7648d07df4..b3fbf4009a 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,10 @@ VERSION := $(shell ./version.sh) COMMIT := $(shell [ -z "${COMMIT_ID}" ] && git log -1 --format='%H' || echo ${COMMIT_ID} ) BUILDTIME := $(shell date -u +"%Y%m%d.%H%M%S" ) DOCKER ?= docker -# allow setting of DOCKER_COMPOSE_ARGS to pass additional args to docker compose -# useful for setting profiles -DOCKER_COMPOSE ?= $(DOCKER) compose $(COMPOSE_ARGS) +# allow setting of NODE_COMPOSE_ARGS to pass additional args to docker compose +# useful for setting profiles and/ort optional overlays +# example: NODE_COMPOSE_ARGS="--profile monitoring -f docker-compose-persistent.yml" +DOCKER_COMPOSE ?= $(DOCKER) compose $(NODE_COMPOSE_ARGS) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf GOFLAGS := "" GOLANG_CROSS_VERSION ?= v1.22.4 @@ -224,7 +225,7 @@ start-localnet-skip-build: # stop-localnet should include all profiles so other containers are also removed stop-localnet: - cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile all down --remove-orphans + cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile all -f docker-compose.yml down --remove-orphans ############################################################################### ### E2E tests ### diff --git a/contrib/localnet/docker-compose.yml b/contrib/localnet/docker-compose.yml index dda07432ae..e3f2b5c9c9 100644 --- a/contrib/localnet/docker-compose.yml +++ b/contrib/localnet/docker-compose.yml @@ -313,7 +313,7 @@ services: - ssh:/root/.ssh grafana: - image: grafana/grafana:9.1.7 + image: grafana/grafana:10.4.8 container_name: grafana hostname: grafana profiles: @@ -322,6 +322,7 @@ services: volumes: - ./grafana/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml - ./grafana/dashboards/:/etc/grafana/provisioning/dashboards + - ./grafana/grafana.ini:/etc/grafana/grafana.ini - grafana_storage:/var/lib/grafana ports: - "3000:3000" diff --git a/contrib/localnet/grafana/grafana.ini b/contrib/localnet/grafana/grafana.ini new file mode 100644 index 0000000000..2542a77f90 --- /dev/null +++ b/contrib/localnet/grafana/grafana.ini @@ -0,0 +1,5 @@ +[auth.anonymous] +enabled = true + +org_id = 1 +org_role = Editor