Skip to content

Commit

Permalink
local-dev: add grafana to docker-compose
Browse files Browse the repository at this point in the history
It's nice to be able to see the prometheus metrics in a
dashboard when running Clair locally

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy authored and hdonnay committed Jul 15, 2021
1 parent 5df0b7b commit 0285c30
Show file tree
Hide file tree
Showing 7 changed files with 1,885 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/howto/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ localhost:7000 --- Traefik Web UI.
Good for troubleshooting http issues.
localhost:9090 --- Prometheus
localhost:3000 --- Grafana
Login:
username: admin
password: admin
```

## Pushing to the Local Quay
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ local-dev-up: vendor
$(docker-compose) up -d traefik
$(docker-compose) up -d jaeger
$(docker-compose) up -d prometheus
$(docker-compose) up -d grafana
$(docker-compose) up -d rabbitmq
$(docker-compose) up -d activemq
$(docker-compose) up -d clair-db
Expand All @@ -52,6 +53,7 @@ local-dev-up-with-quay: vendor
$(docker-compose) up -d traefik
$(docker-compose) up -d jaeger
$(docker-compose) up -d prometheus
$(docker-compose) up -d grafana
$(docker-compose) up -d rabbitmq
$(docker-compose) up -d activemq
$(docker-compose) up -d clair-db
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ services:
environment:
COLLECTOR_ZIPKIN_HTTP_PORT: 9411


prometheus:
container_name: clair-prometheus
image: prom/prometheus:latest
Expand All @@ -209,6 +210,17 @@ services:
ports:
- "9090:9090"

grafana:
container_name: clair-grafana
image: grafana/grafana:8.0.3
ports:
- 3000:3000
user: "472"
volumes:
- ./local-dev/grafana/provisioning/:/etc/grafana/provisioning/
depends_on:
- prometheus

## QUAY ##
redis:
container_name: clair-redis
Expand Down
Loading

0 comments on commit 0285c30

Please sign in to comment.