Skip to content

geniusdynamics/ns8-semaphoreui

Repository files navigation

ns8-semaphoreui

This is a module for NethServer 8 that installs Semaphore, a modern open-source Ansible UI.


✅ Install

Instantiate the module with:

add-module ghcr.io/geniusdynamics/semaphoreui:latest 1

Example output:

{
  "module_id": "semaphoreui1",
  "image_name": "semaphoreui",
  "image_url": "ghcr.io/geniusdynamics/semaphoreui:latest"
}

⚙️ Configure

Assuming your instance is named semaphoreui1, configure it by setting the domain and HTTPS options:

api-cli run configure-module --agent module/semaphoreui1 --data - <<EOF
{
  "host": "semaphoreui.domain.com",
  "http2https": true,
  "lets_encrypt": false
}
EOF

This command:

  • Starts the Semaphore UI
  • Creates a virtual host via Traefik

📤 Email Configuration via SmartHost

Email/SMTP settings are automatically discovered from the centralized SmartHost Redis configuration using the discover-smarthost hook.

Automatically injected values:

  • SEMAPHORE_EMAIL_SENDER
  • SEMAPHORE_EMAIL_HOST
  • SEMAPHORE_EMAIL_PORT
  • SEMAPHORE_EMAIL_USERNAME
  • SEMAPHORE_EMAIL_PASSWORD

You do not need to pass these manually — they're refreshed at container start and on SmartHost changes.


🔔 Alert Integrations (Gotify & Telegram)

Optional alert integrations can be added by including the following variables in your JSON configuration:

Gotify Alerts

  • SEMAPHORE_GOTIFY_ALERT: "True" or "False"
  • SEMAPHORE_GOTIFY_URL: Your Gotify server URL
  • SEMAPHORE_GOTIFY_TOKEN: Application token

Telegram Alerts

  • SEMAPHORE_TELEGRAM_ALERT: "True" or "False"
  • SEMAPHORE_TELEGRAM_CHAT: Telegram Chat ID
  • SEMAPHORE_TELEGRAM_TOKEN: Bot token

All alert settings are written into app.env and used on container startup.


🔍 Get the configuration

api-cli run get-configuration --agent module/semaphoreui1

❌ Uninstall

remove-module --no-preserve semaphoreui1

📡 SmartHost setting discovery

At container startup, bin/discover-smarthost populates state/smarthost.env by querying Redis. When SmartHost settings change, the event handler events/smarthost-changed/10reload_services restarts the container automatically.


🔎 Debugging Tips

Check environment variables:

runagent -m semaphoreui1 env

Launch interactive shell as agent:

runagent -m semaphoreui1

Inspect running containers:

podman ps

Check inside the container:

podman exec semaphoreui-app env
podman exec -ti semaphoreui-app sh

🔮 Testing

Test the module using the following script:

./test-module.sh <NODE_ADDR> ghcr.io/geniusdynamics/semaphoreui:latest

Test logic uses Robot Framework.


🌎 UI Translation

This module supports Weblate for localization.

To contribute:

  1. Add GitHub Weblate app to your repo.
  2. Add the repository to hosted.weblate.org or ask a NethServer developer to include it.

About

This is a Nethserver 8 Implementation oF the Semaphore UI https://github.com/semaphoreui/semaphore

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •