services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    command:
      - serve
    environment:
      TZ: Europe/Berlin    # optional: set desired timezone
      NTFY_BASE_URL: http://ntfy.domr.ovh
      NTFY_AUTH_DEFAULT_ACCESS: deny-all
      NTFY_BEHIND_PROXY: true
      NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
      NTFY_ENABLE_LOGIN: true
      NTFY_UPSTREAM_BASE_URL: https://ntfy.domr.ovh   

    labels:
      kuma.tools.tag.name: 'Tools'
      kuma.tools.tag.color: '#FF9900'
      kuma.homelab.tag.name: 'Homelab'
      kuma.homelab.tag.color: '#FF9955'
      kuma.organization.tag.name: 'Organization'
      kuma.organization.tag.color: '#FF99AA'
      kuma.jenkins.http.tag_names: '[{"name": "tools", "value": "" }, {"name": "organization", "value": "" }]'
      kuma.ntfy.http.name: 'Notify'
      kuma.ntfy.http.url: 'https://ntfy.domr.ovh'
    volumes:
      - /home/soenke/docker-data/ntfy/cache:/var/cache/ntfy
      - /home/soenke/docker-data/ntfy/etc:/etc/ntfy
    ports:
      - 8234:80
    healthcheck: # optional: remember to adapt the host:port to your environment
        test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:8234/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
        interval: 60s
        timeout: 10s
        retries: 3
        start_period: 40s
    restart: unless-stopped
