Files
server-scripts/haven-notify
Jose Henrique 9639c90799
Some checks failed
Check scripts syntax / check-scripts-syntax (push) Successful in 2s
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (push) Has been cancelled
Haven Notify Build and Deploy / Build Haven Notify Image (push) Has been cancelled
ci: align workflows with pipeline-actions; move haven-notify spec to haven
- haven-notify.yaml: replace hand-rolled build+deploy (broken
  docker/build-push-action remote-builder path) with pipeline-actions
  build-and-push + deploy-restart composite actions; full Gitea uses:
  URLs; ubuntu-amd64 runner label.
- main.yaml / test-automated-nfs-backup.yaml: fix runner label
  ubuntu-latest -> ubuntu-amd64.
- Remove haven-notify/deploy manifest; it now lives in the haven
  homelab repo at infra/haven-notify.yaml. Update README accordingly.
2026-07-13 12:06:35 -03:00
..
2025-10-06 22:14:42 -03:00
2025-09-07 11:19:56 -03:00
2025-08-23 21:36:32 -03:00
2025-08-21 21:11:22 -03:00
2025-09-20 20:56:23 -03:00

Haven Notify Logo

Overview

Haven Notify is an internal service designed to send notifications to a specified Discord channel.

It's built in Go and can be deployed as a container or managed service.

Prerequisites

  • Go 1.18 or newer
  • Docker
  • A Discord Webhook URL

API Specification

Send Notification

  • Endpoint: /notify
  • Method: POST
  • Request Body:
{
  "title": "Notification Title",
  "message": "Notification Message"
}

Send Backup Notification

  • Endpoint: /template/notify/backup
  • Method: POST
  • Request Body:
{
  "title": "Notification Title",
  "asset": "Notification Asset Name",
  "backupSizeInMB": 500,
  "extra": [
    {
      "name": "Additional Info",
      "value": "Some extra information"
    }
  ]
}

Send Update Notification

  • Endpoint: /template/notify/update
  • Method: POST
  • Request Body:
{
  "host": "Notification Title",
  "asset": "Notification Message",
  "time": 500 // in seconds
}

Send Error Notification

  • Endpoint: /template/notify/error
  • Method: POST
  • Request Body:
{
  "caller": "Who triggered the error",
  "message": "Error while moving file",
  "critical": true,
  "extra": [
    {
      "name": "Additional Info",
      "value": "Some extra information"
    }
  ]
}

Setup & Usage

Docker

  1. Build the Docker image:
    docker build -t haven-notify .
    
  2. Run the container:
    docker run -e WEBHOOK_URL=your_webhook_url haven-notify
    

Kubernetes

Deployment manifest is available at deploy/haven-notify.yaml.

  1. Edit the manifest to set your environment variables.
  2. Create a generic secret named WEBHOOK_URL with discord-webhook=your_webhook_url:
  • kubectl create secret generic WEBHOOK_URL --from-literal=discord-webhook=<your_webhook_url> -n <namespace>
  1. Apply deployment:
    kubectl apply -f deploy/haven-notify.yaml