Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Sep 30, 2024
1 parent 1b7e2a9 commit 5cd3df1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,9 @@ jobs:
SA_PASSWORD: SApassword1
options: >-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P SApassword1 -b -Q 'SELECT 1;'"
--health-interval 10s
--health-interval 5s
--health-timeout 5s
--health-retries 5
--health-retries 60
--health-start-period 5s
ports:
- 1433:1433
Expand Down
4 changes: 2 additions & 2 deletions docker/sqlserver-latest/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ services:
image: mcr.microsoft.com/mssql/server:latest
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "sa", "-P", "SApassword1", "-b", "-Q", "SELECT 1;"]
interval: 10s
interval: 5s
timeout: 5s
retries: 5
retries: 30
start_period: 5s
environment:
ACCEPT_EULA: Y
Expand Down
9 changes: 9 additions & 0 deletions docker/sqlserver-latest/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ network=$(docker ps --format "{{.Names}} {{.Networks}}" | awk '( $1 ~ /^'$BENCHB
# Also setup the database for use with the sample configs.
# See Also: .github/workflows/maven.yml

# Wait until ready
for i in {1..60}; do
if /usr/bin/docker inspect --format="{{print .State.Health.Status}}" sqlserver | grep -q -x healthy; then
break
else
sleep 5
fi
done

function run_sqlcmd_in_docker() {
set -x
docker run --rm --network=$network --entrypoint /opt/mssql-tools/bin/sqlcmd mcr.microsoft.com/mssql-tools:latest \
Expand Down

0 comments on commit 5cd3df1

Please sign in to comment.