docs: section installation complète depuis Nexus — Linux, RPi, Windows (service + Docker)
CI / build (push) Successful in 4m31s

This commit is contained in:
2026-08-07 09:57:32 -04:00
parent b27c0fd496
commit 3474b8207a
+157 -60
View File
@@ -29,84 +29,181 @@ Dans un homelab avec 8+ hôtes Docker, Gitea, Uptime Kuma et des dizaines de ser
## Installation ## Installation
### Docker (recommandé) Les binaires pré-compilés sont disponibles sur le dépôt Nexus :
```
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/{VERSION}/
```
Remplacer `{VERSION}` par la version souhaitée (ex: `v0.7.0`).
Chaque release contient trois binaires statiques — **zéro dépendance** :
| Fichier | Plateforme |
|---------|-----------|
| `ntfy-bridge-linux-x86_64` | Linux 64-bit (Intel/AMD) |
| `ntfy-bridge-linux-arm64` | Linux ARM64 (Raspberry Pi 3/4/5) |
| `ntfy-bridge-windows-x86_64.exe` | Windows 64-bit |
> 💡 **Pas besoin de V, Git, ni compilateur.** Les binaires sont compilés statiquement — un seul fichier, prêt à exécuter.
---
### Linux (x86_64)
#### Option A : Service système (recommandé)
```bash ```bash
# 1. Cloner le repo # 1. Télécharger le binaire (remplacer v0.7.0 par la version désirée)
git clone https://git.dracodev.net/bruno/ntfy-bridge.git sudo curl -fsSL -o /usr/local/bin/ntfy-bridge \
cd ntfy-bridge https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge-linux-x86_64
sudo chmod +x /usr/local/bin/ntfy-bridge
# 2. Compiler le binaire Linux (cross-compilation depuis Windows/Mac) # 2. Créer le répertoire de config et copier l'exemple
v -os linux -prod -o ntfy-bridge . sudo mkdir -p /etc/ntfy-bridge
sudo curl -fsSL -o /etc/ntfy-bridge/ntfy-bridge.yaml \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge.example.yaml
sudo curl -fsSL -o /etc/ntfy-bridge/dashboard.html \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/dashboard.html
# Ou compiler directement sur Linux : # 3. Éditer la configuration
# v -prod -o ntfy-bridge . sudo vim /etc/ntfy-bridge/ntfy-bridge.yaml
# 3. Configurer # 4. Installer comme service systemd (ou openrc si détecté)
cp ntfy-bridge.example.yaml ntfy-bridge.yaml sudo ntfy-bridge --install-service --config /etc/ntfy-bridge/ntfy-bridge.yaml
vim ntfy-bridge.yaml
# 4. Lancer avec docker compose
docker compose up -d
# 5. Vérifier # 5. Vérifier
curl http://localhost:9090/health curl http://localhost:9090/health
``` ```
Le `docker-compose.yml` inclus monte : **Commandes utiles :**
- `ntfy-bridge.yaml` → `/etc/ntfy-bridge/ntfy-bridge.yaml` (read-only)
- `dashboard.html` → `/etc/ntfy-bridge/dashboard.html` (read-only)
- Port `9090` exposé sur localhost
- Variables d'environnement `NTFY_TOKEN` et `NTFY_HMAC_SECRET`
- Healthcheck intégré (`/health`)
### Raspberry Pi / ARM64
```bash ```bash
# Option A : Binaire pré-compilé (CI) — pas besoin de V systemctl status ntfy-bridge # État du service
# Télécharge l'artifact "ntfy-bridge-linux-arm64" depuis Gitea Actions : systemctl restart ntfy-bridge # Redémarrer après modif de config
# https://git.dracodev.net/bruno/ntfy-bridge/actions journalctl -u ntfy-bridge -f # Logs en temps réel
# ou via API : ntfy-bridge --uninstall-service # Désinstaller le service
curl -s -o ntfy-bridge "https://git.dracodev.net/api/v1/repos/bruno/ntfy-bridge/actions/artifacts/latest/zip?name=binaires"
unzip binaires.zip ntfy-bridge-linux-arm64
mv ntfy-bridge-linux-arm64 ntfy-bridge
chmod +x ntfy-bridge
# Option B : Compiler soi-même (nécessite V)
# Installer V sur Debian 12 / Raspberry Pi OS (aarch64) :
git clone --depth 1 https://github.com/vlang/v ~/v
cd ~/v && make
sudo ln -sf ~/v/v /usr/local/bin/v
# Compiler ntfy-bridge
git clone https://git.dracodev.net/bruno/ntfy-bridge.git
cd ntfy-bridge
v -prod -o ntfy-bridge .
# Lancer
cp ntfy-bridge.example.yaml ntfy-bridge.yaml
vim ntfy-bridge.yaml
./ntfy-bridge --config ntfy-bridge.yaml
``` ```
### Compilation manuelle #### Option B : Docker
```bash ```bash
# Installer V sur Linux x86_64 (Debian/Ubuntu) # 1. Créer un dossier et générer la stack docker-compose
curl -s https://github.com/vlang/v/releases/latest/download/v_linux.zip -o /tmp/v.zip mkdir -p /opt/ntfy-bridge && cd /opt/ntfy-bridge
unzip /tmp/v.zip -d /tmp && sudo /tmp/v/v symlink ntfy-bridge --install-docker .
# Compiler # 2. Éditer la configuration
git clone https://git.dracodev.net/bruno/ntfy-bridge.git
cd ntfy-bridge
v -prod .
# Configurer
cp ntfy-bridge.example.yaml ntfy-bridge.yaml
vim ntfy-bridge.yaml vim ntfy-bridge.yaml
# Lancer # 3. Démarrer
./ntfy-bridge --config ntfy-bridge.yaml docker compose up -d
# 4. Vérifier
curl http://localhost:9090/health
```
Ce que contient la stack Docker :
- Le binaire exposé sur `127.0.0.1:9090`
- `ntfy-bridge.yaml` monté en read-only dans `/etc/ntfy-bridge/`
- `dashboard.html` monté automatiquement
- Variables d'environnement `NTFY_TOKEN` et `NTFY_HMAC_SECRET`
- Healthcheck intégré (`/health` toutes les 30s)
- Redémarrage automatique (`restart: unless-stopped`)
---
### Raspberry Pi (ARM64)
Mêmes étapes que Linux, avec le binaire `linux-arm64` :
```bash
# 1. Télécharger le binaire ARM64
sudo curl -fsSL -o /usr/local/bin/ntfy-bridge \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge-linux-arm64
sudo chmod +x /usr/local/bin/ntfy-bridge
# 2. Récupérer la config et le dashboard
sudo mkdir -p /etc/ntfy-bridge
sudo curl -fsSL -o /etc/ntfy-bridge/ntfy-bridge.yaml \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge.example.yaml
sudo curl -fsSL -o /etc/ntfy-bridge/dashboard.html \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/dashboard.html
# 3. Éditer la config
sudo vim /etc/ntfy-bridge/ntfy-bridge.yaml
# 4. Installer le service
sudo ntfy-bridge --install-service --config /etc/ntfy-bridge/ntfy-bridge.yaml
# 5. Vérifier
curl http://localhost:9090/health
```
**Docker sur Raspberry Pi :** identique à l'option B Linux — le binaire est déjà dans l'image Docker, pas besoin de le télécharger séparément. Utiliser `ntfy-bridge --install-docker .` pour générer la stack.
---
### Windows
```powershell
# 1. Créer le dossier d'installation (PowerShell administrateur)
New-Item -ItemType Directory -Force -Path "$env:ProgramFiles\ntfy-bridge"
# 2. Télécharger le binaire Windows
Invoke-WebRequest -Uri "https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge-windows-x86_64.exe" `
-OutFile "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.exe"
# 3. Télécharger la config et le dashboard
Invoke-WebRequest -Uri "https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/ntfy-bridge.example.yaml" `
-OutFile "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.yaml"
Invoke-WebRequest -Uri "https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.7.0/dashboard.html" `
-OutFile "$env:ProgramFiles\ntfy-bridge\dashboard.html"
# 4. Éditer la configuration (dans le Bloc-notes)
notepad "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.yaml"
# 5. Installer NSSM (requis pour le service Windows)
# Télécharger depuis https://nssm.cc/download
# ou avec scoop : scoop install nssm
# Placer nssm.exe dans le PATH ou dans $env:ProgramFiles\ntfy-bridge\
# 6. Installer comme service Windows
& "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.exe" --install-service `
--config "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.yaml"
# 7. Vérifier
Invoke-WebRequest -Uri http://localhost:9090/health
```
**Commandes utiles (PowerShell) :**
```powershell
nssm status ntfy-bridge # État du service
nssm restart ntfy-bridge # Redémarrer
nssm stop ntfy-bridge # Arrêter
nssm start ntfy-bridge # Démarrer
nssm remove ntfy-bridge confirm # Désinstaller le service
```
Logs du service : `C:\ProgramData\ntfy-bridge\service.log`
---
### Mise à jour
Pour mettre à jour vers une nouvelle version, remplacer le binaire et redémarrer :
```bash
# Linux / Raspberry Pi
sudo curl -fsSL -o /usr/local/bin/ntfy-bridge \
https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.8.0/ntfy-bridge-linux-x86_64
sudo chmod +x /usr/local/bin/ntfy-bridge
sudo systemctl restart ntfy-bridge
```
```powershell
# Windows (PowerShell administrateur)
nssm stop ntfy-bridge
Invoke-WebRequest -Uri "https://nexus.dracodev.net/repository/raw-hosted/ntfy-bridge/v0.8.0/ntfy-bridge-windows-x86_64.exe" `
-OutFile "$env:ProgramFiles\ntfy-bridge\ntfy-bridge.exe"
nssm start ntfy-bridge
``` ```
## Sources supportées ## Sources supportées