Skip to content

Commit

Permalink
Add healthcheck to sslstress server
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm committed Mar 26, 2024
1 parent b432fc6 commit 205da6d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ WORKDIR /app/System.Net.Security/tests/StressTests/SslStress
ARG VERSION=9.0
ARG CONFIGURATION=Release

# install iproute2 for ss command for healthchecks
RUN apt-get update && \
apt-get install iproute2 -y && \
rm -rf /var/lib/apt/lists/*

RUN dotnet build -c $CONFIGURATION \
-p:TargetingPacksTargetsLocation=/live-runtime-artifacts/targetingpacks.targets \
-p:MicrosoftNetCoreAppRefPackDir=/live-runtime-artifacts/microsoft.netcore.app.ref/ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ services:
dockerfile: ./System.Net.Security/tests/StressTests/SslStress//${DOCKERFILE:-Dockerfile}
links:
- server
depends_on:
server:
condition: service_healthy
environment:
- SSLSTRESS_ARGS=--mode client --server-endpoint server:5001 ${SSLSTRESS_CLIENT_ARGS}
server:
Expand All @@ -14,5 +17,10 @@ services:
dockerfile: ./System.Net.Security/tests/StressTests/SslStress/${DOCKERFILE:-Dockerfile}
ports:
- "5001:5001"
healthcheck:
test: ss -tnlp | grep -q ':5001'
interval: 1s
timeout: 10s
retries: 10
environment:
- SSLSTRESS_ARGS=--mode server --server-endpoint 0.0.0.0:5001 ${SSLSTRESS_SERVER_ARGS}

0 comments on commit 205da6d

Please sign in to comment.