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."