fix: rapidapi key
This commit is contained in:
parent
78bed0fbb1
commit
90cd5d7998
17
.github/workflows/deploy.yml
vendored
17
.github/workflows/deploy.yml
vendored
@ -180,9 +180,25 @@ jobs:
|
||||
docker secret ls | grep -q "microsoft_client_id" || echo "AVISO: Secret microsoft_client_id não existe!"
|
||||
docker secret ls | grep -q "microsoft_client_secret" || echo "AVISO: Secret microsoft_client_secret não existe!"
|
||||
|
||||
# Cria secret do RapidAPI automaticamente se não existir
|
||||
echo "Gerenciando secret rapidapi_proxy_secret..."
|
||||
if ! docker secret inspect rapidapi_proxy_secret > /dev/null 2>&1; then
|
||||
printf '%s' '${{ secrets.RAPIDAPI_PROXY_SECRET }}' | docker secret create rapidapi_proxy_secret -
|
||||
echo "Secret rapidapi_proxy_secret criado."
|
||||
else
|
||||
echo "Secret rapidapi_proxy_secret já existe."
|
||||
fi
|
||||
|
||||
# Verifica se o service existe
|
||||
if docker service inspect qrrapido-prod > /dev/null 2>&1; then
|
||||
echo "Service existe, atualizando imagem..."
|
||||
|
||||
# Migração: adiciona o secret ao service se ainda não estiver configurado
|
||||
if ! docker service inspect qrrapido-prod --format '{{range .Spec.TaskTemplate.ContainerSpec.Secrets}}{{.SecretName}} {{end}}' | grep -q "rapidapi_proxy_secret"; then
|
||||
echo "Adicionando rapidapi_proxy_secret ao service existente..."
|
||||
docker service update --secret-add rapidapi_proxy_secret --update-order start-first qrrapido-prod
|
||||
fi
|
||||
|
||||
docker service update \
|
||||
--image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
|
||||
--env-add Serilog__OpenSearchUrl="http://141.148.162.114:19201" \
|
||||
@ -208,6 +224,7 @@ jobs:
|
||||
--secret google_client_secret \
|
||||
--secret microsoft_client_id \
|
||||
--secret microsoft_client_secret \
|
||||
--secret rapidapi_proxy_secret \
|
||||
--env ASPNETCORE_ENVIRONMENT=Production \
|
||||
--env ASPNETCORE_URLS=http://+:8080 \
|
||||
--env Serilog__OpenSearchUrl="http://141.148.162.114:19201" \
|
||||
|
||||
@ -189,7 +189,7 @@
|
||||
}
|
||||
},
|
||||
"RapidApi": {
|
||||
"ProxySecret": ""
|
||||
"ProxySecret": "c9a7c750-2c39-11f1-9fe6-59a87b6d6ae1"
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user