37 lines
995 B
Bash
Executable File
37 lines
995 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 /home/debian/4NK_env/.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
|