4NK_env/scripts/lecoffre_node/update-images.sh
LeCoffre Deployment 43a05a2742 clean
2025-09-25 12:19:35 +00:00

37 lines
974 B
Bash
Executable File

#!/bin/bash
# Script de mise à jour des images Docker sans perdre les données
# Sauvegarde automatique avant mise à jour
set -e
# Couleurs pour l'affichage
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE} LeCoffre Node - Update Images${NC}"
echo -e "${BLUE}========================================${NC}"
echo
# Créer une sauvegarde automatique
echo -e "${YELLOW}Creating automatic backup before update...${NC}"
./scripts/backup-data.sh
echo
echo -e "${YELLOW}Updating Docker images...${NC}"
# Mettre à jour les images
docker compose --env-file .env.master pull
echo -e "${GREEN}✅ Images updated successfully!${NC}"
echo
echo -e "${BLUE}To apply the updates:${NC}"
echo -e "${YELLOW} ./scripts/start.sh${NC}"
echo
echo -e "${BLUE}To rollback if needed:${NC}"
echo -e "${YELLOW} ./scripts/restore-data.sh <backup_name>${NC}"
echo