services:
  adguardhome:
    image: adguard/adguardhome:latest
    restart: unless-stopped

    ports:
      - 53:53/udp
      - 53:53/tcp
      - 853:853

    volumes:
      - /home/docker/DenNamer/conf:/opt/adguardhome/conf
      - /home/docker/DenNamer/work:/opt/adguardhome/work

    networks:
      tan-network:
        ipv4_address: 10.10.0.10

    labels:
      - traefik.enable=true

      # Router HTTPS
      - traefik.http.routers.adguard.rule=Host(`guard.luckyden.org`)
      - traefik.http.routers.adguard.entrypoints=websecure
      - traefik.http.routers.adguard.tls.certresolver=cloudflare

      # Service → port interne AdGuard
      - traefik.http.services.adguard.loadbalancer.server.port=80

      # Optionnel mais recommandé
      - traefik.http.middlewares.adguard-headers.headers.customrequestheaders.X-Forwarded-Proto=https

networks:
  tan-network:
    external: true