24 lines
851 B
TypeScript
24 lines
851 B
TypeScript
|
|
import { execSync } from 'child_process';
|
||
|
|
|
||
|
|
async function fixAndPush() {
|
||
|
|
try {
|
||
|
|
console.log('\nAdicionando arquivos corrigidos para o Coolify (porta 8080)...');
|
||
|
|
execSync('git add Dockerfile nginx.conf scripts/fix-gateway-push.ts', { stdio: 'inherit' });
|
||
|
|
|
||
|
|
try {
|
||
|
|
execSync('git commit -m "fix(deploy): altera a porta do Nginx e Dockerfile para 8080 para evitar erro de Bad Gateway no Coolify"', { stdio: 'inherit' });
|
||
|
|
} catch (e) {
|
||
|
|
console.log('Nada para commitar.');
|
||
|
|
}
|
||
|
|
|
||
|
|
console.log('\nFazendo push do código...');
|
||
|
|
execSync('git push origin main', { stdio: 'inherit' });
|
||
|
|
|
||
|
|
console.log(`\n🎉 Resolvido e push concluído com sucesso!`);
|
||
|
|
} catch (error: any) {
|
||
|
|
console.error('\n❌ Ocorreu um erro:', error.message);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
fixAndPush();
|