Rendre docker-backup.sh entierement generique via DOCKER_APP_NAME

Suppression de tous les hardcodes 'gitea' dans docker-backup.sh :
noms de backup, fichiers DB/volumes, patterns de nettoyage, script
restore genere, metadonnees, logs et notifications.

Autres corrections :
- docker-auto-update.sh : VERSION_ENDPOINT configurable au lieu
  du endpoint Gitea /api/v1/version en dur
- restore.sh : HEALTH_CHECK_URL au lieu de localhost:3000 en dur
- docker-scripts.conf : ajout VERSION_ENDPOINT
- Suppression de backup-docker.sh (script legacy non generique)
- README : synchronisation des noms de fichiers reels
- Correction config file source (gitea-scripts.conf -> docker-scripts.conf)
This commit is contained in:
2026-06-26 14:13:54 -04:00
parent 286d2403ad
commit 6f761fe8ed
6 changed files with 171 additions and 150 deletions
+2 -2
View File
@@ -394,7 +394,7 @@ $DOCKER_COMPOSE restart 2>&1 || true
echo ""
echo "🏥 Vérification que ${DOCKER_APP_NAME} répond..."
for i in $(seq 1 30); do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:3000" 2>/dev/null || echo "000")
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${HEALTH_CHECK_URL:-http://localhost:3000}" 2>/dev/null || echo "000")
if [[ "$STATUS" == "200" || "$STATUS" == "302" || "$STATUS" == "303" ]]; then
ok "${DOCKER_APP_NAME} répond (HTTP $STATUS) après ${i}s"
break
@@ -416,7 +416,7 @@ echo ""
echo " Durée : ${DURATION}s"
echo " Backup : $BACKUP_NAME"
echo " Cible : $TARGET_COMPOSE_DIR"
echo " ${DOCKER_APP_NAME} : http://localhost:3000"
echo " ${DOCKER_APP_NAME} : ${HEALTH_CHECK_URL:-http://localhost:3000}"
echo ""
echo " Logs : $DOCKER_COMPOSE logs -f"
echo " Status : $DOCKER_COMPOSE ps"