fix(deploy): altera a porta do Nginx e Dockerfile para 8080 para evitar erro de Bad Gateway no Coolify
This commit is contained in:
parent
05c6033e01
commit
aa1685209b
3 changed files with 26 additions and 3 deletions
|
|
@ -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;"]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8080;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|
|
||||||
23
scripts/fix-gateway-push.ts
Normal file
23
scripts/fix-gateway-push.ts
Normal 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();
|
||||||
Loading…
Reference in a new issue