From 1f586ef44129c7e6a5e49bcd998def4739c1997a Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Thu, 25 Jun 2026 10:31:23 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Auto-deploy:=20BrainKP=20atualiz?= =?UTF-8?q?ado=20em=2025/06/2026=2010:31:23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/static/index.html b/static/index.html index 2ac9b5d..1a82972 100644 --- a/static/index.html +++ b/static/index.html @@ -485,17 +485,25 @@ function openRestoreModal(type, filename, size) { // Now get instructions based on type let instructions = ''; if (type === 'apps') { - instructions = `📦 Apps restaurado em: ${d.extracted_to}\n\n` + + const appName = filename.split('-')[0]; + instructions = `📦 App restaurado em: ${d.extracted_to}\n\n` + `Para aplicar:\n` + - ` cp -r ${d.extracted_to}/Camila/* /root/Apps/Camila/\n` + - ` cp -r ${d.extracted_to}/RAG/* /root/Apps/RAG/\n` + - ` cp -r ${d.extracted_to}/VOXDO/* /root/Apps/VOXDO/\n\n` + + ` rsync -av --ignore-existing ${d.extracted_to}/${appName}/ /root/Apps/${appName}/\n\n` + `Depois reinicie os serviços.`; } else if (type === 'bd') { - instructions = `🗄️ Backup BD restaurado em: ${d.extracted_to}\n\n` + + const dbType = filename.includes('supabase') ? 'Supabase' : 'Gitea'; + let sqlCommand = `cat ${d.sql_files?.[0] || ''} | docker exec -i psql -U postgres -d `; + + if (dbType === 'Supabase') { + sqlCommand = `cat ${d.sql_files?.[0] || ''} | docker exec -i supabase-db psql -U postgres -d postgres`; + } else { + sqlCommand = `cat ${d.sql_files?.[0] || ''} | docker exec -i coolify-db psql -U postgres -d postgres`; + } + + instructions = `🗄️ Backup BD (${dbType}) restaurado em: ${d.extracted_to}\n\n` + `SQL: ${d.sql_files?.join(', ') || 'não encontrado'}\n\n` + - `Para restaurar:\n` + - ` cat ${d.sql_files?.[0] || ''} | docker exec -i psql -U postgres -d `; + `Para restaurar execute no host:\n` + + ` ${sqlCommand}`; } else if (type === 'git') { instructions = `🐙 Backup Git restaurado em: ${d.extracted_to}\n\n` + `Arquivos: ${(d.files || []).slice(0,5).join(', ')}...\n\n` +