Skip to content

Commit

Permalink
docker: split monitoring out of docker-compose-grafana
Browse files Browse the repository at this point in the history
And move kafka-ui to it.
  • Loading branch information
vincentbernat committed Nov 13, 2023
1 parent 305a459 commit c630409
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-ipinfo.yml
# GEOIPUPDATE_ACCOUNT_ID=...
# GEOIPUPDATE_LICENSE_KEY=...

## Monitoring (Prometheus)
COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-monitoring.yml

## Grafana
COMPOSE_FILE=${COMPOSE_FILE}:docker/docker-compose-grafana.yml

Expand Down
23 changes: 0 additions & 23 deletions docker/docker-compose-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,7 @@
version: "3"
volumes:
akvorado-grafana:
akvorado-prometheus:
services:
prometheus:
image: prom/prometheus:v2.47.2
restart: unless-stopped
user: root # for access to /var/run/docker.sock
volumes:
- akvorado-prometheus:/prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
# Those are the defaults
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/usr/share/prometheus/consoles
# Those are not the defaults
- --web.external-url=/prometheus
labels:
- traefik.enable=true
- traefik.http.routers.prometheus.entrypoints=public
- traefik.http.routers.prometheus.rule=PathPrefix(`/prometheus`)
- traefik.http.services.prometheus.loadbalancer.server.port=9090

grafana:
image: grafana/grafana-oss:10.2.0
environment:
Expand Down
40 changes: 40 additions & 0 deletions docker/docker-compose-monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
version: "3"
volumes:
akvorado-prometheus:
services:
prometheus:
image: prom/prometheus:v2.47.2
restart: unless-stopped
user: root # for access to /var/run/docker.sock
volumes:
- akvorado-prometheus:/prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
# Those are the defaults
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/usr/share/prometheus/consoles
# Those are not the defaults
- --web.external-url=/prometheus
labels:
- traefik.enable=true
- traefik.http.routers.prometheus.entrypoints=public
- traefik.http.routers.prometheus.rule=PathPrefix(`/prometheus`)
- traefik.http.services.prometheus.loadbalancer.server.port=9090

kafka-ui:
image: provectuslabs/kafka-ui:v0.5.0
restart: unless-stopped
depends_on:
- kafka
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- SERVER_SERVLET_CONTEXT_PATH=/kafka-ui
labels:
- traefik.enable=true
- traefik.http.routers.kafka-ui.entrypoints=private
- traefik.http.routers.kafka-ui.rule=PathPrefix(`/kafka-ui`)
15 changes: 1 addition & 14 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
timeout: 10s
retries: 3
test: ["CMD-SHELL", "echo ruok | nc -w3 127.0.0.1 2181 | grep -xFq imok"]

kafka:
image: bitnami/kafka:3.5
environment:
Expand All @@ -49,19 +50,6 @@ services:
timeout: 10s
retries: 3
test: ["CMD", "kafka-topics.sh", "--list", "--bootstrap-server", "kafka:9092"]
kafka-ui:
image: provectuslabs/kafka-ui:v0.5.0
restart: unless-stopped
depends_on:
- kafka
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- SERVER_SERVLET_CONTEXT_PATH=/kafka-ui
labels:
- traefik.enable=true
- traefik.http.routers.kafka-ui.entrypoints=private
- traefik.http.routers.kafka-ui.rule=PathPrefix(`/kafka-ui`)

redis:
image: bitnami/redis:7.0
Expand All @@ -77,7 +65,6 @@ services:
akvorado-service: &akvorado-image
image: ghcr.io/akvorado/akvorado:latest
command: version

akvorado-orchestrator:
<<: *akvorado-image
restart: unless-stopped
Expand Down

0 comments on commit c630409

Please sign in to comment.