Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6893818
LPD-62912 Add configs for SQL Server
anthony-chu Sep 30, 2025
441b2c9
LPD-62912 Include SQL Server JDBC jar in bundle
anthony-chu Sep 30, 2025
3f76e26
LPD-62912 Reuse DB2 database results for SQL Server
anthony-chu Sep 30, 2025
020f54d
LPD-62912 Add recipe files for SQL Server
anthony-chu Sep 30, 2025
730a4f4
LPD-62912 Optionally change ownership for SQL Server files in data-he…
anthony-chu Sep 30, 2025
bd54b02
LPD-62912 Expose property for SQL Server
anthony-chu Sep 30, 2025
9829c00
LPD-62912 Update README
anthony-chu Sep 30, 2025
1fe39ac
LPD-62912 Copy as root
anthony-chu Sep 30, 2025
9473df8
LPD-62912 Using busybox is sufficient
anthony-chu Sep 30, 2025
6b87728
LPD-62912 Convert to elif statements
anthony-chu Oct 1, 2025
1bf9e94
LPD-62912 Add restore to entrypoint
anthony-chu Oct 1, 2025
531744d
LPD-62912 Update condition
anthony-chu Oct 1, 2025
4f8a859
LPD-62912 Add config for database type
anthony-chu Oct 1, 2025
c73b844
LPD-62912 Consolidate jdbc driver tasks into one
anthony-chu Oct 1, 2025
f196aea
LPD-62912 Add missing MariaDB config for consistency
anthony-chu Oct 1, 2025
630271b
LPD-62912 Run copy task conditionally
anthony-chu Oct 1, 2025
f6ce535
LPD-62912 Add mssql jdbc jar to .gitignore
anthony-chu Oct 1, 2025
c1c5f01
LPD-62912 uses the configuration itself to conditionally run the task
drewbrokke Oct 2, 2025
53a0b8f
LPD-62912 Ensure dump is owned by mssql user when using SQL Server
anthony-chu Oct 8, 2025
4b2d942
LPD-62912 Ensure column name is single quoted to avoid keyword
anthony-chu Oct 8, 2025
e631132
LPD-62912 Include backup file for sql server
anthony-chu Oct 8, 2025
44dbd38
LPD-62912 Fix backup file path
anthony-chu Oct 8, 2025
467a68b
LPD-62912 Return empty map if no results are found
anthony-chu Oct 8, 2025
54254f6
LPD-62912 Fix database file location
anthony-chu Oct 8, 2025
d2e5d00
LPD-62912 Fix health check
anthony-chu Oct 8, 2025
70538d9
LPD-62912 Use early returns
anthony-chu Oct 8, 2025
7ae54a9
LPD-62912 Make entrypoint echos clearer
anthony-chu Oct 8, 2025
1736a2d
LPD-62912 Fix DB type
anthony-chu Oct 9, 2025
cdd3244
LPD-62912 Field not used
anthony-chu Oct 9, 2025
121e76c
LPD-62912 Add missing documentation
anthony-chu Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions compose-recipes/sqlserver/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ create_database() {

if [[ $(_is_database_present ${database_name}) ]]; then
echo "Database ${database_name} is present; skipping database creation"
elif [[ $(_has_backup_file) ]]; then

return
fi

if [[ $(_has_backup_file) ]]; then
echo "Database backup found; restoring database ${database_name}..."

sed -i "s,%DATABASE_NAME%,${database_name},g" /init/restore.sql
Expand All @@ -40,19 +44,25 @@ create_database() {
sed -i "s,%BACKUP_FILE%,${backup_file},g" /init/restore.sql

${_sqlcmd} -i /init/restore.sql
elif [[ $(_has_database_files ${database_name}) ]]; then

return
fi

if [[ $(_has_database_files ${database_name}) ]]; then
echo "Database files found; reattaching database ${database_name}..."

sed -i "s,%DATABASE_NAME%,${database_name},g" /init/reinit.sql

${_sqlcmd} -i /init/reinit.sql
else
echo "Could not find database ${database_name}; creating database..."

sed -i "s,%DATABASE_NAME%,${database_name},g" /init/init.sql

${_sqlcmd} -i /init/init.sql
return
fi

echo "Could not find database ${database_name}; creating database..."

sed -i "s,%DATABASE_NAME%,${database_name},g" /init/init.sql

${_sqlcmd} -i /init/init.sql
}

main() {
Expand Down