From 35c2fc4786edff715f384e6aea33b3aea86172c8 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 30 Oct 2024 09:23:53 -0300 Subject: [PATCH] add mysql sleep in docker --- generators/micronaut/generator.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/generators/micronaut/generator.js b/generators/micronaut/generator.js index 8a4a6ec2..1d93f4ba 100644 --- a/generators/micronaut/generator.js +++ b/generators/micronaut/generator.js @@ -203,6 +203,11 @@ export default class extends BaseApplicationGenerator { get [BaseApplicationGenerator.POST_WRITING]() { return this.asPostWritingTaskGroup({ + addMysqlSleep({ application }) { + this.editFile(`${application.dockerServicesDir}mysql.yml`, content => + content.replace("'SHOW DATABASES;']", "'SHOW DATABASES;', '&&', 'sleep', '5']").replace('timeout: 5s', 'timeout: 10s') + ); + }, addMicronautDependencies({ application, source }) { const { javaDependencies } = application; source.addJavaDefinition({