diff --git a/example/grafana.yaml b/example/grafana.yaml index e93c7d6e5b..2bd25bb638 100644 --- a/example/grafana.yaml +++ b/example/grafana.yaml @@ -16,13 +16,24 @@ services: timeout: 10s retries: 5 + install-dashboard-dependencies: + build: images/jb + restart: on-failure + depends_on: + grafana: + condition: service_healthy + volumes: + - ../operations/alloy-mixin:/etc/alloy-mixin + working_dir: /etc/alloy-mixin + command: jb install + # Provision alloy-mixin after Grafana is healthy and running. provision-dashboards: build: images/grizzly restart: on-failure depends_on: - grafana: - condition: service_healthy + install-dashboard-dependencies: + condition: service_completed_successfully environment: - GRAFANA_URL=http://grafana:3000 volumes: @@ -35,8 +46,8 @@ services: build: images/grizzly restart: on-failure depends_on: - grafana: - condition: service_healthy + install-dashboard-dependencies: + condition: service_completed_successfully environment: - GRAFANA_URL=http://grafana:3000 volumes: diff --git a/example/images/jb/Dockerfile b/example/images/jb/Dockerfile new file mode 100644 index 0000000000..82543f33d8 --- /dev/null +++ b/example/images/jb/Dockerfile @@ -0,0 +1,3 @@ +FROM golang:1.22-alpine + +RUN go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@c862f0670eb199b5024e31ff024f39b74d3b803a