Skip to content

Commit fb1113f

Browse files
committed
MariaDB ci test to use healthcheck.sh to order
The healthcheck.sh in the container can perform a few more extensive functions that the wait-for-it script. ref: https://mariadb.com/kb/en/using-healthcheck-sh-script/
1 parent a524671 commit fb1113f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docker-compose.mariadb.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ services:
1313
environment:
1414
MARIADB_ROOT_PASSWORD: ${DB_PASSWD:-prestashop}
1515
MARIADB_DATABASE: ${DB_NAME:-prestashop}
16+
healthcheck:
17+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
18+
start_period: 10s
19+
interval: 5s
20+
timeout: 1s
21+
retries: 3
1622
restart: unless-stopped
1723
networks:
1824
- prestashop-network
@@ -49,12 +55,13 @@ services:
4955
BLACKFIRE_ENABLE: ${BLACKFIRE_ENABLE:-0}
5056
BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID:-0}
5157
BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN:-0}
52-
command: /tmp/wait-for-it.sh --timeout=60 --strict mariadb:3306 -- /tmp/docker_run_git.sh
58+
command: /tmp/docker_run_git.sh
5359
ports:
5460
- "8001:80"
5561
- "8002:443"
5662
depends_on:
57-
- mariadb
63+
mariadb:
64+
condition: service_healthy
5865
volumes:
5966
- ./:/var/www/html:delegated
6067
networks:

0 commit comments

Comments
 (0)