Fix API deploy healthcheck by starting Kestrel before migrate/seed.
Compose was marking the API unhealthy because bootstrap blocked app.Run(), so /health/live never answered within the HEALTHCHECK window.
This commit is contained in:
@@ -52,7 +52,9 @@ USER app
|
||||
ENV ASPNETCORE_URLS=http://+:8080
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
||||
# Liveness only (/health/live). Readiness is asserted by CD smoke (/health/ready).
|
||||
# start-period covers process + Kestrel bind; migrate/seed no longer block listen.
|
||||
HEALTHCHECK --interval=10s --timeout=5s --start-period=40s --retries=6 \
|
||||
CMD curl -fsS http://localhost:8080/health/live || exit 1
|
||||
|
||||
ENTRYPOINT ["dotnet", "VigilCareRecordsAPI.dll"]
|
||||
|
||||
Reference in New Issue
Block a user