🚀 Auto-deploy: BrainKP atualizado em 25/06/2026 10:31:23
This commit is contained in:
+15
-7
@@ -485,17 +485,25 @@ function openRestoreModal(type, filename, size) {
|
|||||||
// Now get instructions based on type
|
// Now get instructions based on type
|
||||||
let instructions = '';
|
let instructions = '';
|
||||||
if (type === 'apps') {
|
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` +
|
`Para aplicar:\n` +
|
||||||
` cp -r ${d.extracted_to}/Camila/* /root/Apps/Camila/\n` +
|
` rsync -av --ignore-existing ${d.extracted_to}/${appName}/ /root/Apps/${appName}/\n\n` +
|
||||||
` cp -r ${d.extracted_to}/RAG/* /root/Apps/RAG/\n` +
|
|
||||||
` cp -r ${d.extracted_to}/VOXDO/* /root/Apps/VOXDO/\n\n` +
|
|
||||||
`Depois reinicie os serviços.`;
|
`Depois reinicie os serviços.`;
|
||||||
} else if (type === 'bd') {
|
} 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] || '<sql-file>'} | docker exec -i <container> psql -U postgres -d <db>`;
|
||||||
|
|
||||||
|
if (dbType === 'Supabase') {
|
||||||
|
sqlCommand = `cat ${d.sql_files?.[0] || '<sql-file>'} | docker exec -i supabase-db psql -U postgres -d postgres`;
|
||||||
|
} else {
|
||||||
|
sqlCommand = `cat ${d.sql_files?.[0] || '<sql-file>'} | 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` +
|
`SQL: ${d.sql_files?.join(', ') || 'não encontrado'}\n\n` +
|
||||||
`Para restaurar:\n` +
|
`Para restaurar execute no host:\n` +
|
||||||
` cat ${d.sql_files?.[0] || '<sql-file>'} | docker exec -i <container> psql -U postgres -d <db>`;
|
` ${sqlCommand}`;
|
||||||
} else if (type === 'git') {
|
} else if (type === 'git') {
|
||||||
instructions = `🐙 Backup Git restaurado em: ${d.extracted_to}\n\n` +
|
instructions = `🐙 Backup Git restaurado em: ${d.extracted_to}\n\n` +
|
||||||
`Arquivos: ${(d.files || []).slice(0,5).join(', ')}...\n\n` +
|
`Arquivos: ${(d.files || []).slice(0,5).join(', ')}...\n\n` +
|
||||||
|
|||||||
Reference in New Issue
Block a user