From 205c6b027c736a672648b8869322f22375e26851 Mon Sep 17 00:00:00 2001 From: Ricardo Carneiro Date: Mon, 15 Sep 2025 10:20:06 -0300 Subject: [PATCH] fix: add host para acessar o opensearch --- .gitea/workflows/deploy.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f76a591..e6ccd50 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -89,13 +89,11 @@ jobs: # Puxa nova imagem ARM64 docker pull registry.redecarneir.us/convertit:latest - # Executa o novo container na porta 80 + # Executa o novo container na porta 80 com network host para acessar OpenSearch docker run -d \ --name convertit \ --restart unless-stopped \ - --add-host="k3ss1:172.17.0.1" \ - --add-host="k3sw2:172.17.0.1" \ - -p 80:8080 \ + --network host \ --memory=2g \ --cpus=1.5 \ --health-cmd="curl -f http://localhost:8080/health || exit 1" \ @@ -118,9 +116,9 @@ jobs: # Verifica se o container está rodando docker ps | grep convertit - # Testa se a aplicação está respondendo na porta 80 + # Testa se a aplicação está respondendo na porta 8080 (com network host) sleep 10 - curl -f http://localhost:80 || echo "Aplicação pode estar inicializando..." + curl -f http://localhost:8080 || echo "Aplicação pode estar inicializando..." - name: Deploy to Staging (x86_64) if: startsWith(github.ref, 'refs/heads/release/') @@ -189,7 +187,10 @@ jobs: docker logs convertit --tail 20 echo "=== Teste de conectividade ===" - curl -I http://localhost:80 || echo "Aplicação ainda não está acessível" + curl -I http://localhost:8080 || echo "Aplicação ainda não está acessível" + + echo "=== Teste de conectividade OpenSearch ===" + curl -I http://localhost:9202 || echo "OpenSearch não está acessível" - name: Verify staging deployment if: startsWith(github.ref, 'refs/heads/release/')