diff --git a/docker-compose.yml b/docker-compose.yml index c750835..59378cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,7 @@ services: - ./composer.json:/app/composer.json - data:/app/data depends_on: - clickhouse: - condition: service_healthy + - clickhouse restart: unless-stopped nginx: @@ -42,8 +41,7 @@ services: - data:/app/data - log_collect:/collect depends_on: - clickhouse: - condition: service_healthy + - clickhouse command: ["php", "bin/consume", "--daemon"] restart: unless-stopped @@ -58,11 +56,7 @@ services: nofile: soft: 262144 hard: 262144 - healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"] - interval: 5s - timeout: 3s - retries: 10 + volumes: data: diff --git a/docker/entrypoint-api.sh b/docker/entrypoint-api.sh index 43ccf2f..7892d9b 100755 --- a/docker/entrypoint-api.sh +++ b/docker/entrypoint-api.sh @@ -2,16 +2,4 @@ mkdir -p /app/data chmod -R 777 /app/data rm -f /app/data/*.lock - -# Wait for ClickHouse to be ready -echo "Waiting for ClickHouse..." -for i in $(seq 1 30); do - if wget --spider -q http://clickhouse:8123/ping 2>/dev/null; then - echo "ClickHouse is ready" - break - fi - echo " attempt $i..." - sleep 1 -done - exec docker-php-entrypoint "$@" \ No newline at end of file