version: '3.8'

services:
  blackbox-exporter:
    image: prom/blackbox-exporter:latest
    container_name: blackbox-exporter
    restart: unless-stopped
    ports:
      - "127.0.0.1:9115:9115"
    volumes:
      - ./blackbox.yml:/etc/blackbox_exporter/config.yml
    command:
      - '--config.file=/etc/blackbox_exporter/config.yml'
    networks:
      - monitoring_monitoring
      - traefik-public
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.blackbox.rule=Host(`blackbox.ai-impress.com`)"
      - "traefik.http.routers.blackbox.entrypoints=websecure"
      - "traefik.http.routers.blackbox.tls.certresolver=cloudflare"
      - "traefik.http.routers.blackbox.middlewares=authentik@file"
      - "traefik.http.services.blackbox.loadbalancer.server.port=9115"

networks:
  monitoring_monitoring:
    external: true
  traefik-public:
    external: true
