Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: add sleep in mysql healthcheck #27737

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
176 changes: 66 additions & 110 deletions generators/docker-compose/__snapshots__/docker-compose.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mscouchbase:
Expand Down Expand Up @@ -317,12 +315,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mscassandra:
Expand Down Expand Up @@ -572,12 +568,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -612,12 +606,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mspsql:
Expand Down Expand Up @@ -956,12 +948,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -1001,12 +991,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mspsql:
Expand Down Expand Up @@ -1384,12 +1372,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -1424,12 +1410,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mspsql:
Expand Down Expand Up @@ -1719,12 +1703,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -1759,12 +1741,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

mspsql:
Expand Down Expand Up @@ -2045,12 +2025,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -2085,12 +2063,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -2237,12 +2213,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -2277,12 +2251,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -2454,12 +2426,10 @@ management:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -2494,12 +2464,10 @@ management:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -2735,12 +2703,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

msmysql:
Expand Down Expand Up @@ -2775,12 +2741,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -2894,12 +2858,10 @@ Launch all your infrastructure by running: \`docker compose up -d\`.
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10
samplemysql-elasticsearch:
image: elasticsearch-placeholder
Expand Down Expand Up @@ -3026,12 +2988,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -3160,12 +3120,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down Expand Up @@ -3292,12 +3250,10 @@ jhipster:
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test:
- CMD
- mysql
- -e
- SHOW DATABASES;
- CMD-SHELL
- mysql -e "SHOW DATABASES;" && sleep 5
interval: 5s
timeout: 5s
timeout: 10s
retries: 10

consul:
Expand Down
4 changes: 2 additions & 2 deletions generators/docker/templates/docker/mysql.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
- 127.0.0.1:3306:3306
command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
healthcheck:
test: ["CMD", "mysql", "-e", "SHOW DATABASES;"]
test: ['CMD-SHELL', 'mysql -e "SHOW DATABASES;" && sleep 5']
interval: 5s
timeout: 5s
timeout: 10s
retries: 10
Loading