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" - "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 - default alertmanager: image: prom/alertmanager:latest labels: - "traefik.enable=true" - "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: - backend - alertmanager - 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" - "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 alertmanager: