The command
clickhouse-client --query "SELECT 1"
can also be used. Docker compose file becomes:
services: clickhouse: healthcheck: test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]