fix: deploy sem fingerprint
This commit is contained in:
parent
95c8e7901b
commit
122b0e6f51
@ -81,13 +81,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to Staging Servers
|
- name: Deploy to Staging Servers
|
||||||
run: |
|
run: |
|
||||||
# Configura SSH known_hosts
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
ssh-keyscan -H 141.148.162.114 >> ~/.ssh/known_hosts
|
|
||||||
ssh-keyscan -H 129.146.116.218 >> ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
# Deploy no Servidor 1
|
# Deploy no Servidor 1
|
||||||
ssh ubuntu@141.148.162.114 << 'EOF'
|
ssh -o StrictHostKeyChecking=no ubuntu@141.148.162.114 << 'EOF'
|
||||||
# Para o container atual se existir
|
# Para o container atual se existir
|
||||||
docker stop qrrapido-staging || true
|
docker stop qrrapido-staging || true
|
||||||
docker rm qrrapido-staging || true
|
docker rm qrrapido-staging || true
|
||||||
@ -108,7 +103,7 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Deploy no Servidor 2
|
# Deploy no Servidor 2
|
||||||
ssh ubuntu@129.146.116.218 << 'EOF'
|
ssh -o StrictHostKeyChecking=no ubuntu@129.146.116.218 << 'EOF'
|
||||||
# Para o container atual se existir
|
# Para o container atual se existir
|
||||||
docker stop qrrapido-staging || true
|
docker stop qrrapido-staging || true
|
||||||
docker rm qrrapido-staging || true
|
docker rm qrrapido-staging || true
|
||||||
@ -137,13 +132,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to Production Servers
|
- name: Deploy to Production Servers
|
||||||
run: |
|
run: |
|
||||||
# Configura SSH known_hosts
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
ssh-keyscan -H 141.148.162.114 >> ~/.ssh/known_hosts
|
|
||||||
ssh-keyscan -H 129.146.116.218 >> ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
# Deploy no Servidor 1 (com NGINX)
|
# Deploy no Servidor 1 (com NGINX)
|
||||||
ssh ubuntu@141.148.162.114 << 'EOF'
|
ssh -o StrictHostKeyChecking=no ubuntu@141.148.162.114 << 'EOF'
|
||||||
# Para o container atual se existir
|
# Para o container atual se existir
|
||||||
docker stop qrrapido-prod || true
|
docker stop qrrapido-prod || true
|
||||||
docker rm qrrapido-prod || true
|
docker rm qrrapido-prod || true
|
||||||
@ -168,7 +158,7 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Deploy no Servidor 2
|
# Deploy no Servidor 2
|
||||||
ssh ubuntu@129.146.116.218 << 'EOF'
|
ssh -o StrictHostKeyChecking=no ubuntu@129.146.116.218 << 'EOF'
|
||||||
# Para o container atual se existir
|
# Para o container atual se existir
|
||||||
docker stop qrrapido-prod || true
|
docker stop qrrapido-prod || true
|
||||||
docker rm qrrapido-prod || true
|
docker rm qrrapido-prod || true
|
||||||
@ -196,7 +186,7 @@ jobs:
|
|||||||
|
|
||||||
# Verifica se os serviços estão respondendo
|
# Verifica se os serviços estão respondendo
|
||||||
echo "Verificando Servidor 1..."
|
echo "Verificando Servidor 1..."
|
||||||
ssh ubuntu@141.148.162.114 'curl -f http://localhost:5001/health || echo "Servidor 1 pode não estar respondendo"'
|
ssh -o StrictHostKeyChecking=no ubuntu@141.148.162.114 'curl -f http://localhost:5001/health || echo "Servidor 1 pode não estar respondendo"'
|
||||||
|
|
||||||
echo "Verificando Servidor 2..."
|
echo "Verificando Servidor 2..."
|
||||||
ssh ubuntu@129.146.116.218 'curl -f http://localhost:5001/health || echo "Servidor 2 pode não estar respondendo"'
|
ssh -o StrictHostKeyChecking=no ubuntu@129.146.116.218 'curl -f http://localhost:5001/health || echo "Servidor 2 pode não estar respondendo"'
|
||||||
Loading…
Reference in New Issue
Block a user