Skip to content

Commit bcf3741

Browse files
committed
example dhi
some changes
1 parent 0b94155 commit bcf3741

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/fpm-nginx-dhi/docker-compose.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ services:
8585
- wsc-database
8686
- wsc-mysql
8787
- wsc-mariadb
88+
healthcheck:
89+
test: mysqladmin ping -h 127.0.0.1 -P 3306 -u root || exit 1
90+
#test: mysqladmin ping -h 127.0.0.1 -P 3306 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD || exit 1
91+
#start_period: 10s
92+
interval: 30s
93+
timeout: 5s
94+
retries: 3
95+
# check with: "docker inspect --format='{{json .State.Health}}' wsc-db | jq"
8896
# TODO: only do this commands after first start when using dhi mysql image (create database and user with password form environment vars):
8997
# docker exec -it wsc-mysql bash -c 'mysql -uroot -e "CREATE DATABASE ${MYSQL_DATABASE};"'
9098
# docker exec -it wsc-mysql bash -c 'mysql -uroot -e "CREATE USER \"${MYSQL_USER}\"@\"%\" IDENTIFIED BY \"${MYSQL_PASSWORD}\"; GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO \"${MYSQL_USER}\"@\"%\";"'
@@ -211,7 +219,8 @@ services:
211219
- traefik-net
212220
healthcheck:
213221
test: ['CMD', 'traefik', 'healthcheck', '--ping', "--entryPoints.ping.address=:8082", "--ping.entryPoint=ping"]
214-
interval: 10s
222+
#start_period: 10s
223+
interval: 30s
215224
timeout: 5s
216225
retries: 3
217226
# check with: "docker inspect --format='{{json .State.Health}}' traefik | jq"

0 commit comments

Comments
 (0)