diff --git a/docker-compose.yml b/docker-compose.yml index 5999f7fcc0216058f26972d61b42792da6997796..999c5047081cc3c082767d78f9b3fc24746bd579 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,8 @@ services: volumes: - ./src:/var/www/html depends_on: - - mysql + mysql: + condition: service_healthy mysql: image: mysql:latest @@ -20,6 +21,12 @@ services: env_file: .env volumes: - ./mysql:/var/lib/mysql + healthcheck: + test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD + start_period: 5s + interval: 5s + timeout: 5s + retries: 55 phpmyadmin: image: phpmyadmin:latest @@ -28,4 +35,5 @@ services: ports: - 8081:80 depends_on: - - mysql \ No newline at end of file + mysql: + condition: service_healthy \ No newline at end of file