diff --git a/testing.compose.yml b/testing.compose.yml index 2e3b30d..5f851cb 100644 --- a/testing.compose.yml +++ b/testing.compose.yml @@ -14,7 +14,10 @@ services: networks: - testing depends_on: - - test-db + test-db: + condition: service_healthy + test-redis: + condition: service_healthy test-db: profiles: @@ -23,7 +26,25 @@ services: container_name: incoviba_test_db env_file: ${APP_PATH:-.}/.test.db.env volumes: - - test-db:/var/lib/mysql + - test-db:/var/lib/mysql} + healthcheck: + test: [ "CMD", "mariadb-admin", "ping", "-h", "localhost" ] + interval: 5s + timeout: 5s + retries: 10 + networks: + - testing + + test-redis: + profiles: + - testing + image: redis:latest + container_name: incoviba_test_redis + healthcheck: + test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] + interval: 5s + timeout: 5s + retries: 5 networks: - testing