services:
  uptime-kuma:
    # not using the template because ncsd is not configured to support changing PUID/PGID
    # https://github.com/louislam/uptime-kuma/issues/4743
    # extends:
    #   file: ${TEMPLATES_PATH}
    #   service: default
    image: louislam/uptime-kuma:2.2.1
    container_name: uptime-kuma
    restart: unless-stopped
    security_opt:
      - no-new-privileges=true
    environment:
      TZ: ${TZ}
    volumes:
      - ${INFRA_PATH}/uptime-kuma/config:/app/data
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 5001:3001
    networks:
      - ip4net
      - ip6net
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.uptime-kuma.rule=Host(`uptime-kuma.${LOCAL_DOMAIN}`)"
      - "traefik.http.routers.uptime-kuma.entrypoints=https"
      - "traefik.http.routers.uptime-kuma.tls=true"
