version: '3.8'

services:
  uptime-kuma:
    image: louislam/uptime-kuma:2
    container_name: uptime-kuma
    restart: unless-stopped
    networks:
      - traefik-public
    volumes:
      - uptime-kuma-data:/app/data
    environment:
      # SMTP Configuration - Office365
      SMTPHOST: aiimpress-com0e.mail.protection.outlook.com
      SMTPPORT: 25
      SMTPSECURE: "true"
      SMTPFROM: noreply@ai-impress.com
      TIMEZONE: Europe/London
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik-public"
      - "traefik.http.routers.uptime-kuma.rule=Host(`status.ai-impress.com`)"
      - "traefik.http.routers.uptime-kuma.entrypoints=websecure"
      - "traefik.http.routers.uptime-kuma.tls.certresolver=cloudflare"
      - "traefik.http.services.uptime-kuma.loadbalancer.server.port=3001"
      - "traefik.http.routers.uptime-kuma.middlewares=authentik@file"

networks:
  traefik-public:
    external: true

volumes:
  uptime-kuma-data:
    external: true
    name: uptime-kuma_uptime-kuma-data
