Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Use clickhouse config when connecting to it

Uku Taht91dd199fe2e2
diff --git a/lib/plausible_release.ex b/lib/plausible_release.ex
index 59fef555ab..1d08a1f192 100644
--- a/lib/plausible_release.ex
+++ b/lib/plausible_release.ex
@@ -210,12 +210,10 @@ defmodule Plausible.Release do
Application.ensure_all_started(:db_connection)
Application.ensure_all_started(:hackney)
+ clickhouse_config = Application.get_env(:plausible, :clickhouse)
+
Clickhousex.start_link(
- scheme: :http,
- port: 8123,
- name: :clickhouse,
- database: "default",
- hostname: Keyword.get(Application.get_env(:plausible, :clickhouse), :hostname)
+ Keyword.merge([scheme: :http, port: 8123, name: :clickhouse], clickhouse_config)
)
end