improve Makefile and secure bash scripts
This commit is contained in:
26
Makefile
26
Makefile
@@ -5,16 +5,16 @@ export
|
||||
|
||||
help:
|
||||
@echo "Nextcloud Docker - Commandes disponibles:"
|
||||
@echo " make up - Démarrer les services"
|
||||
@echo " make down - Arrêter les services"
|
||||
@echo " make restart - Redémarrer"
|
||||
@echo " make logs - Voir les logs"
|
||||
@echo " make ps - Status des containers"
|
||||
@echo " make occ - Lancer une commande occ"
|
||||
@echo " make backup - Backup complet"
|
||||
@echo " make restore - Restaurer un backup"
|
||||
@echo " make update - Mettre à jour Nextcloud"
|
||||
@echo " make health - Vérifier la santé du système"
|
||||
@echo " make up - Démarrer les services"
|
||||
@echo " make down - Arrêter les services"
|
||||
@echo " make restart - Redémarrer"
|
||||
@echo " make logs - Voir les logs"
|
||||
@echo " make ps - Status des containers"
|
||||
@echo " make occ <cmd> - Lancer une commande occ"
|
||||
@echo " make backup - Backup complet"
|
||||
@echo " make restore <file> - Restaurer un backup"
|
||||
@echo " make update - Mettre à jour Nextcloud"
|
||||
@echo " make health - Vérifier la santé du système"
|
||||
|
||||
up:
|
||||
docker-compose up -d
|
||||
@@ -38,7 +38,7 @@ backup:
|
||||
@bash scripts/backup.sh
|
||||
|
||||
restore:
|
||||
@bash scripts/restore.sh
|
||||
@bash scripts/restore.sh $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
update:
|
||||
@bash scripts/update.sh
|
||||
@@ -47,3 +47,7 @@ health:
|
||||
@docker-compose exec nextcloud php occ status
|
||||
@docker-compose exec nextcloud php occ config:list system
|
||||
@docker-compose exec db mysql -u$(MYSQL_USER) -p$(MYSQL_PASSWORD) -e "SELECT 1" 2>/dev/null && echo "✅ Base de données accessible" || echo "❌ Erreur base de données"
|
||||
|
||||
# Catch-all target pour permettre les arguments aux commandes occ et restore
|
||||
%:
|
||||
@:
|
||||
|
||||
Reference in New Issue
Block a user