Skip to content

Commit

Permalink
add mysql sleep in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Oct 30, 2024
1 parent 26b351a commit 35c2fc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generators/micronaut/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 35c2fc4

Please sign in to comment.