Repository navigation
Publicar a API como imagem Docker e corrigir o bundle de migrations no CD - #21
Merged
Merged
Conversation
… nos testes de domínio
…r o contêiner no App Service
Rodrigosdk
had a problem deploying
to
production
November 11, 2026 19:07 — with
GitHub Actions
Failure
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Esta branch corrige a falha do primeiro deploy, passa a publicar a API como imagem Docker e leva para a
maino último ajuste dos alertas do CodeQL.Mudanças
Deploy com imagem Docker
docker/Dockerfileusado nodocker composelocal e a publica no GitHub Container Registry:ghcr.io/rodrigosdk/policydesk-api, com a tag do SHA do commit e alatest.packages: writee publica com oGITHUB_TOKENda execução. Usa cache de camadas do GitHub Actions e etiquetas OCI (source,revision,licenses).azure/webapps-deploycomimages:). Voltar uma versão é trocar a tag.infra/main.bicep: o Web App passa a serDOCKER|ghcr.io/rodrigosdk/policydesk-api, comWEBSITES_PORT=8080,WEBSITES_ENABLE_APP_SERVICE_STORAGE=falseeDOCKER_REGISTRY_SERVER_URL=https://ghcr.io. Sai oSCM_DO_BUILD_DURING_DEPLOYMENT, que só fazia sentido no modelo de código.Bundle de migrations no CD
NETSDK1047: Assets file ... doesn't have a target for 'net10.0/linux-x64', porque reaproveitava uma restauração feita sem runtime.dotnet restore ... --runtime linux-x64antes de gerar o executável. Ele roda em paralelo com o job da imagem.Alertas do CodeQL
PoliciesRepository.GetPageAsynccapturam o valor antes da consulta (if (status is { } statusFilter)), em vez de usar.Valuede um tipo anulável.ShouldNotBeNull()passa a ser encadeado direto na asserção seguinte, sem.Value.developerfica sem nenhum alerta aberto.O que já foi verificado
200na primeira tentativa. Ele já foi apagado.Productioncom usuário sem privilégios, logs em JSON e porta 8080.developer: CI, bundle e imagem passaram, e o deploy foi recusado pela proteção do environmentproduction, como esperado. A imagem530aabdjá está noghcr.ioe baixa sem login.Como testar
CI,Bundle de migrations,Imagem DockereDeploy em produçãodevem passar.curl https://policydesk-api-rodrigo.azurewebsites.net/healthdeve responderHealthy.🤖 Generated with Claude Code