Skip to content

Commit

Permalink
Merge pull request #20 from humanmade/wait-for-mysql
Browse files Browse the repository at this point in the history
Wait for MySQL to be running
  • Loading branch information
roborourke authored May 13, 2019
2 parents dcb95ea + c6df630 commit bc1b17c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ version: '2.3'
x-php: &php
init: true
depends_on:
- db
- redis
- elasticsearch
- xray
db:
condition: service_healthy
redis:
condition: service_started
elasticsearch:
condition: service_started
xray:
condition: service_started
image: humanmade/altis-local-server-php
networks:
- proxy
Expand Down Expand Up @@ -53,6 +57,10 @@ services:
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "wordpress", "-pwordpress" ]
timeout: 20s
retries: 10
redis:
image: redis:3.2-alpine
networks:
Expand Down

0 comments on commit bc1b17c

Please sign in to comment.