Skip to content

Commit

Permalink
More WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Hornwitser committed Oct 30, 2024
1 parent 0202009 commit 970ba1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/mssql/latest/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
volumes:
- mssql-latest:/var/opt/mssql
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", "SA", "-P", "Password12!", "-l", "30", "-Q", "SELECT 1"]
test: ["CMD", "/opt/mssql-tools18/bin/sqlcmd", "-S", "localhost", "-No", "-U", "SA", "-P", "Password12!", "-l", "30", "-Q", "SELECT 1"]
interval: 3s
timeout: 1s
retries: 10
Expand Down
2 changes: 1 addition & 1 deletion dev/mssql/latest/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ docker compose -p sequelize-mssql-latest up -d
./../../wait-until-healthy.sh sequelize-mssql-latest

docker exec sequelize-mssql-latest \
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Password12!" -Q "CREATE DATABASE sequelize_test; ALTER DATABASE sequelize_test SET READ_COMMITTED_SNAPSHOT ON;"
/opt/mssql-tools18/bin/sqlcmd -S localhost -No -U SA -P "Password12!" -Q "CREATE DATABASE sequelize_test; ALTER DATABASE sequelize_test SET READ_COMMITTED_SNAPSHOT ON;"

DIALECT=mssql ts-node ../../check-connection.ts
4 changes: 2 additions & 2 deletions dev/wait-until-healthy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$#" -ne 1 ]; then
exit 1
fi

for _ in {1..75}
for _ in {1..50}
do
state=$(docker inspect -f '{{ .State.Health.Status }}' $1 2>&1)
return_code=$?
Expand All @@ -16,5 +16,5 @@ do
sleep 0.4
done

>&2 echo "Timeout of 30s exceeded when waiting for container to be healthy: $1"
>&2 echo "Timeout of 20s exceeded when waiting for container to be healthy: $1"
exit 1

0 comments on commit 970ba1f

Please sign in to comment.