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 committed Mar 27, 2024
1 parent a615878 commit c9d01fd
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 @@ -195,6 +195,7 @@ protected ClickHouseNode getServer(ClickHouseNode base) {
}

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

Expand Down

0 comments on commit c9d01fd

Please sign in to comment.