mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
Add health checks
This commit is contained in:
parent
89c326a8b7
commit
17fdab8e06
@ -14,5 +14,8 @@ FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/CleanArchitecture.Api/out ./
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
||||
CMD curl --fail http://localhost/healthz || exit 1
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["dotnet", "CleanArchitecture.Api.dll"]
|
||||
|
@ -10,10 +10,15 @@ services:
|
||||
- db
|
||||
links:
|
||||
- db
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
db:
|
||||
image: mcr.microsoft.com/mssql/server
|
||||
environment:
|
||||
- ACCEPT_EULA=Y
|
||||
- SA_PASSWORD=YourStrongPassword
|
||||
- SA_PASSWORD=Password123!#
|
||||
ports:
|
||||
- 1433:1433
|
||||
|
Loading…
Reference in New Issue
Block a user