From 0903ba14121233de991bd1535d636cb089ee99f8 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Thu, 11 Jun 2026 06:16:45 +0000 Subject: [PATCH] Add clickhouse (ct) --- ct/clickhouse.sh | 45 +++++++++++++++++++++++++++++++++++ ct/headers/clickhouse | 6 +++++ install/clickhouse-install.sh | 29 ++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 ct/clickhouse.sh create mode 100644 ct/headers/clickhouse create mode 100644 install/clickhouse-install.sh diff --git a/ct/clickhouse.sh b/ct/clickhouse.sh new file mode 100644 index 000000000..6d02e3bb0 --- /dev/null +++ b/ct/clickhouse.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://clickhouse.com + +APP="ClickHouse" +var_tags="${var_tags:-database;analytics;observability}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-no}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if ! command -v clickhouse-server &>/dev/null; then + msg_error "No ${APP} Installation Found!" + exit + fi + + setup_clickhouse + msg_ok "Updated successfully!" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}" diff --git a/ct/headers/clickhouse b/ct/headers/clickhouse new file mode 100644 index 000000000..d1ac13cba --- /dev/null +++ b/ct/headers/clickhouse @@ -0,0 +1,6 @@ + _________ __ __ __ + / ____/ (_)____/ /__/ / / /___ __ __________ + / / / / / ___/ //_/ /_/ / __ \/ / / / ___/ _ \ +/ /___/ / / /__/ ,< / __ / /_/ / /_/ (__ ) __/ +\____/_/_/\___/_/|_/_/ /_/\____/\__,_/____/\___/ + diff --git a/install/clickhouse-install.sh b/install/clickhouse-install.sh new file mode 100644 index 000000000..7c5596e7b --- /dev/null +++ b/install/clickhouse-install.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://clickhouse.com + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +setup_clickhouse + +msg_info "Configuring ClickHouse" +cat </etc/clickhouse-server/config.d/listen.xml + + 0.0.0.0 + +EOF +systemctl restart clickhouse-server +msg_ok "Configured ClickHouse" + +motd_ssh +customize +cleanup_lxc