infrastructure/ansible/plays/services/mimir/docker-compose.yaml

88 lines
3.2 KiB
YAML
Raw Permalink Normal View History

services:
mimir:
image: grafana/mimir:latest
restart: unless-stopped
volumes:
- data:/mimir
- ./mimir.yml:/etc/mimir-config/mimir.yaml:ro,Z
{% for tenant in groups['prometheus']|map('extract', hostvars, 'inventory_hostname') %}
- ./rules:/data/rules/{{ tenant|replace('.', '-') }}:ro,Z
{% endfor %}
entrypoint:
- /bin/mimir
- -config.file=/etc/mimir-config/mimir.yaml
- -validation.max-label-names-per-series=60
- -tenant-federation.enabled=true
labels:
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8080"
- "traefik.enable=true"
2024-01-22 18:56:17 +01:00
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "traefik.http.routers.mimir.rule=Host(`mimir.tobiasmanske.de`)"
- "traefik.http.middlewares.mimir-auth.basicauth.users={{ common.mimir.username }}:{{ common.mimir.password_hash | mandatory }}"
- "traefik.http.routers.mimir.entryPoints=websecure"
- "traefik.http.services.mimir.loadbalancer.server.port=8080"
- "traefik.http.routers.mimir.middlewares=mimir-auth"
networks:
- backend
2024-01-09 23:35:29 +01:00
- metrics
- default
alertmanager:
image: prom/alertmanager:latest
labels:
- "traefik.enable=true"
2024-01-22 18:56:17 +01:00
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "traefik.http.routers.alertmanager.rule=Host(`alertmanager.tobiasmanske.de`)"
- "traefik.http.routers.alertmanager.entryPoints=websecure"
- "traefik.http.services.alertmanager.loadbalancer.server.port=9093"
- "traefik.http.routers.alertmanager.middlewares=oauth@file"
volumes:
- ./alertmanager.yml:/etc/alertmanager/config.yml:ro,Z
- alertmanager_data:/data
networks:
- alertmanager
- backend
- metrics
- default
restart: unless-stopped
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--web.external-url=https://alertmanager.tobiasmanske.de'
- '--storage.path=/data'
alertmanager-matrix:
image: jaywink/matrix-alertmanager:latest
restart: unless-stopped
labels:
- "traefik.enable=true"
2024-01-22 18:56:17 +01:00
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "traefik.http.routers.alertmanager-matrix.rule=Host(`alertmanager.tobiasmanske.de`) && PathPrefix(`/matrix/`)"
- "traefik.http.routers.alertmanager-matrix.middlewares=matrix-strip"
- "traefik.http.middlewares.matrix-strip.stripprefix.prefixes=/matrix"
- "traefik.http.middlewares.matrix-strip.stripprefix.forceslash=false"
- "traefik.http.routers.alertmanager-matrix.entryPoints=websecure"
- "traefik.http.services.alertmanager-matrix.loadbalancer.server.port=3000"
environment:
- APP_PORT=3000
- APP_ALERTMANAGER_SECRET={{ mimir.alertmanager.matrix.alertmanager_token | mandatory }}
- MATRIX_HOMESERVER_URL=http://pantalaimon:8008
- MATRIX_ROOMS={{ mimir.alertmanager.matrix.rooms | join('|') }}
- MATRIX_TOKEN={{ mimir.alertmanager.matrix.matrix_token }}
- MATRIX_USER=@alertmanager:{{ matrix.baseurl }}
- MENTION_ROOM=1
networks:
- alertmanager
- pantalaimon
volumes:
data:
alertmanager_data:
networks:
pantalaimon:
external: true
backend:
internal: true
metrics:
external: true
alertmanager: