From d20eb945fa80fb9218277f764cffa06c1753fb05 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 23 Mar 2026 14:23:30 +0700 Subject: [PATCH] =?UTF-8?q?260323:1423=20fix=20CI=20:=20Verify=20relaase?= =?UTF-8?q?=20:=20=F0=9F=90=8B=20Login=20to=20Internal=20Registry=20#08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index acad7bd..21fc6e2 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -40,11 +40,19 @@ if [ -z "$DB_PASSWORD" ]; then if [ -f "$LCBP3_DIR/$CURRENT/.env.production" ]; then export $(grep DB_PASSWORD "$LCBP3_DIR/$CURRENT/.env.production" | xargs) fi + # Fallback to default if still empty + if [ -z "$DB_PASSWORD" ]; then + DB_PASSWORD="Center#2025" + fi fi -docker exec lcbp3-mariadb mysqldump -u root -p"${DB_PASSWORD}" lcbp3_dms > "$BACKUP_FILE" -gzip "$BACKUP_FILE" -echo "✓ Backup created: $BACKUP_FILE.gz" +if docker exec mariadb mysqldump -u root -p"${DB_PASSWORD}" lcbp3 > "$BACKUP_FILE"; then + gzip "$BACKUP_FILE" + echo "✓ Backup created: $BACKUP_FILE.gz" +else + echo "⚠️ Database backup failed or mariadb container not running. Skipping backup for this deployment..." + rm -f "$BACKUP_FILE" +fi # Step 2: Build latest images directly on QNAP echo "[2/9] Building latest Docker images from source..."