updated install script to wait until db is online

This commit is contained in:
Kai Ritthaler 2025-06-14 21:30:05 +02:00 committed by Rudi Regentonne
parent 4f91c0d850
commit f9fd0551f8
4 changed files with 9 additions and 16 deletions

View file

@ -75,6 +75,7 @@ if (fs.existsSync(".env")) {
console.error("Error writing to file:", err);
}
}
let failed: boolean = false;
// running the commands from the JSON file
// The commands are executed in the order they are defined in the JSON file
(async () => {
@ -87,6 +88,7 @@ if (fs.existsSync(".env")) {
console.log(stdout); // Print the output of the command`);
} catch (error: any) {
console.log(`error: ${error.message}`);
failed = true;
break; // Stop execution if an error occurs
}
}
@ -104,6 +106,6 @@ if (fs.existsSync(".env")) {
console.log("Bucket 'images' created successfully.");
}
console.log("Installation complete");
console.log(failed?"installation failed":"Installation complete");
process.exit(0); // Exit the process after all commands are executed
})();