From 291cc195b1095a82de3a7de3090e17d019772aa3 Mon Sep 17 00:00:00 2001 From: KoCoder Date: Wed, 18 Mar 2026 00:36:14 +0100 Subject: [PATCH] Fix: Tooling-Container actually run migrations --- Einheit_4/tooling_container/entrypoint.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Einheit_4/tooling_container/entrypoint.sh b/Einheit_4/tooling_container/entrypoint.sh index edaf3cf..25e626d 100755 --- a/Einheit_4/tooling_container/entrypoint.sh +++ b/Einheit_4/tooling_container/entrypoint.sh @@ -1,8 +1,4 @@ #!/bin/bash -# Wait for SQL Server to boot up (adjust sleep if needed) -echo "Waiting for SQL Server to start..." -sleep 20s - # Run the three SQL files using sqlcmd # -S: Server, -U: User, -P: Password (passed via ENV) echo "Applying SQL files..." @@ -10,7 +6,7 @@ echo "Applying SQL files..." for migration in $(ls . | grep -E '\.sql$') do echo "Applying $migration." - /opt/mssql-tools/bin/sqlcmd -D $DSN_PASSWORD -i $migration.sql + /opt/mssql-tools/bin/sqlcmd -S mssql-server -U sa -C -P "$DSN_PASSWORD" -i $migration.sql done echo "Database initialization complete."