v.20.10Improvement

Do not allow connections to ClickHouse until initialization scripts are executed

Do not allow connections to ClickHouse server until all scripts in /docker-entrypoint-initdb.d/ are executed. #15244 (Aleksei Kozharin).
Prevent ClickHouse server from accepting client connections until all initialization scripts in /docker-entrypoint-initdb.d/ have been executed.

Why it matters

This feature ensures that the ClickHouse server is fully initialized and configured by running all required setup scripts before allowing any client connections. It helps avoid connection attempts to an unready server, improving reliability and deployment correctness in Docker environments.

How to use it

Place your initialization scripts inside the /docker-entrypoint-initdb.d/ directory in the ClickHouse Docker container. The server will automatically execute these scripts at startup and only accept connections after their successful completion.