From 1c2004fce73fd2c07e033fc7a3447a091fa7cd17 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 14 Nov 2020 14:20:13 +0000 Subject: [PATCH] Add clickhouse configuration to disable logging tables. These tables aren't appropriate for small-scale installations, especially for single home use. See https://theorangeone.net/posts/calming-down-clickhouse/ and https://github.com/plausible/analytics/issues/301 --- clickhouse/clickhouse-config.xml | 14 ++++++++++++++ clickhouse/clickhouse-user-config.xml | 8 ++++++++ docker-compose.yml | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 clickhouse/clickhouse-config.xml create mode 100644 clickhouse/clickhouse-user-config.xml diff --git a/clickhouse/clickhouse-config.xml b/clickhouse/clickhouse-config.xml new file mode 100644 index 0000000..ddd5f1c --- /dev/null +++ b/clickhouse/clickhouse-config.xml @@ -0,0 +1,14 @@ + + + warning + true + + + + + + + + + + diff --git a/clickhouse/clickhouse-user-config.xml b/clickhouse/clickhouse-user-config.xml new file mode 100644 index 0000000..f795286 --- /dev/null +++ b/clickhouse/clickhouse-user-config.xml @@ -0,0 +1,8 @@ + + + + 0 + 0 + + + diff --git a/docker-compose.yml b/docker-compose.yml index e7b2367..ae23bc8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,8 @@ services: image: yandex/clickhouse-server:latest volumes: - event-data:/var/lib/clickhouse + - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml:ro + - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/docker_related_user_config.xml:ro ulimits: nofile: soft: 262144