feat(agent): add health check endpoint and Docker HEALTHCHECK
Migrate from Microsoft.NET.Sdk.Worker to Microsoft.NET.Sdk.Web to enable HTTP health checks. Add /healthz endpoint via AgentHealthCheck (reports healthy when registered with Central). Configure Docker HEALTHCHECK with 30s interval and 15s start period.
This commit is contained in:
1 parent
eafbab5e7a
commit
58f46fe3dd
5 files changed
+66
-8
No files matched your search
@@ -21,7 +21,11 @@ WORKDIR /app
|
||||
RUN apk add --no-cache icu-libs libstdc++ ffmpeg
|
||||
|
||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||
ENV ASPNETCORE_URLS=http://+:8080
|
||||
|
||||
COPY --from=build /app .
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/healthz || exit 1
|
||||
|
||||
ENTRYPOINT ["dotnet", "Heimdall.Agent.dll"]
|
||||
Reference in new issue
Block a user