fix(deploy): altera a porta do Nginx e Dockerfile para 8080 para evitar erro de Bad Gateway no Coolify

This commit is contained in:
AI Studio Assistant 2026-05-09 03:02:31 +00:00
parent 05c6033e01
commit aa1685209b
3 changed files with 26 additions and 3 deletions

View file

@ -24,8 +24,8 @@ COPY --from=builder /app/dist /usr/share/nginx/html
# Copy our custom nginx configuration # Copy our custom nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80 # Expose port 8080
EXPOSE 80 EXPOSE 8080
# Start nginx # Start nginx
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

View file

@ -1,5 +1,5 @@
server { server {
listen 80; listen 8080;
server_name _; server_name _;
root /usr/share/nginx/html; root /usr/share/nginx/html;

View file

@ -0,0 +1,23 @@
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();