Files
server-scripts/haven-notify
Jose Henrique 100262513b
Some checks failed
Check scripts syntax / check-scripts-syntax (push) Successful in 1m19s
Haven Notify Build and Deploy / Build Haven Notify Image (push) Failing after 1m51s
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (push) Successful in 33s
Improvements for haven-notify
2025-08-21 21:11:22 -03:00
..
2025-08-21 21:11:22 -03:00
2025-08-21 21:11:22 -03:00
2025-08-16 22:51:35 -03:00
2025-08-21 21:11:22 -03:00
2025-08-21 21:11:22 -03:00

Haven Notify

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"
}
  • Endpoint: /template/notify/backup_template
  • Method: POST
  • Request Body:
{
  "title": "Notification Title",
  "message": "Notification Message",
  "backupSizeInMB": 500,
  "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
  3. Apply deployment:
    kubectl apply -f deploy/haven-notify.yaml