Merge pull request #331 from docker/add-timeout-to-db-connection

This commit is contained in:
Michael Irwin 2022-12-14 07:55:30 -05:00 committed by GitHub
commit 9cdc998137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,12 @@ async function init() {
const password = PASSWORD_FILE ? fs.readFileSync(PASSWORD_FILE) : PASSWORD; const password = PASSWORD_FILE ? fs.readFileSync(PASSWORD_FILE) : PASSWORD;
const database = DB_FILE ? fs.readFileSync(DB_FILE) : DB; const database = DB_FILE ? fs.readFileSync(DB_FILE) : DB;
await waitPort({ host, port : 3306}); await waitPort({
host,
port: 3306,
timeout: 10000,
waitForDns: true,
});
pool = mysql.createPool({ pool = mysql.createPool({
connectionLimit: 5, connectionLimit: 5,