fix: allow ClickHouse connections from Docker network
The default ClickHouse image restricts the 'default' user to localhost only. Override with clickhouse-users.xml to allow connections from any IP (needed for inter-container communication on the Docker network). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,7 @@ services:
|
||||
volumes:
|
||||
- chdata:/var/lib/clickhouse
|
||||
- ./docker/clickhouse-init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||
- ./docker/clickhouse-users.xml:/etc/clickhouse-server/users.d/default-user.xml:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "clickhouse-client --query 'SELECT 1'"]
|
||||
interval: 10s
|
||||
|
||||
9
docker/clickhouse-users.xml
Normal file
9
docker/clickhouse-users.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<clickhouse>
|
||||
<users>
|
||||
<default>
|
||||
<networks>
|
||||
<ip>::/0</ip>
|
||||
</networks>
|
||||
</default>
|
||||
</users>
|
||||
</clickhouse>
|
||||
Reference in New Issue
Block a user