Skip to content

Commit

Permalink
build correctly the cloud endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mzitnik authored and Paultagoras committed Jun 28, 2024
1 parent 83c35cf commit 1bdb15b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ public static ClickHouseNode getClickHouseNode(ClickHouseProtocol protocol, bool
if (isCloud()) {
port = 8443;
host = System.getenv("CLICKHOUSE_CLOUD_HOST");
return ClickHouseNode.builder(template)
.address(protocol, new InetSocketAddress(host, port))
.addOption("password", getPassword())
.addOption("user", "default")
.build();
} else if (container != null) {
host = container.getHost();
port = container.getMappedPort(port);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ protected ClickHouseNode getServer(ClickHouseNode base) {
}

protected ClickHouseNode getServer() {
if (isCloud()) return getSecureServer(getProtocol());
return getServer(getProtocol());
}

Expand Down

0 comments on commit 1bdb15b

Please sign in to comment.