Тип сервиса
Сервис ClickHouse
Самостоятельно размещаемое аналитическое хранилище ClickHouse для колоночных данных и SQL-запросов к постоянно хранимым наборам данных.
Вы добавляете этот сервис в стек и выбираете там его версию и ресурсы. Каждое окружение может их переопределить.
В StackMaster
Как ClickHouse работает в StackMaster
clickhouse/clickhouse-server image as a single node.How applications reach it
- Host: the name of this app service inside the environment.
- Ports:
8123HTTP interface,9000native protocol. Applications inside the environment use these directly, without TLS. - Wodby defines three tokens:
database(default),username(a fixed account name) andpassword(generated). A service linked to this one receives host, port and these tokens in variables named by the linking service; read them in code and do not copy the password into the repository. - Inside this container the same values are in
CLICKHOUSE_DB,CLICKHOUSE_USERandCLICKHOUSE_PASSWORD. The image creates that user and database from them. CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENTis set to1, so this user may create other users, roles and databases with SQL.
Public address
Port 8123 is the service's main HTTP endpoint, so it gets a public HTTPS address. 9000 stays private.
- The address's root answers
Ok.. Open/playto run queries and/dashboardfor the built-in charts, and sign in there with the account above. - Warning: the public address accepts SQL from anywhere for anyone with that password, including statements that change or delete data. Queries sent without it are refused.
/playand/dashboardsend the password in the URL of every query, so it can appear in ingress logs. A link such as/play?password=...also carries it.- Keep the generated password, or replace it with one as long and random. Do not share
/playor/dashboardURLs or copy them into tickets or chat, and do not add the password to a URL. - To restrict who can reach the address, use App Access or disable the route. App Access covers this port because it has a route, and services in the environment keep connecting directly. It needs an active paid subscription.
- Do not turn on Wodby Basic Auth for this service. ClickHouse uses the
Authorizationheader for its own login, so/play,/dashboardand HTTP clients stop working behind Basic Auth.
Changing configuration
Server settings are not exposed as manifest settings or config files. Create further databases, users and grants with SQL through the account above rather than through additional environment variables.
Data
Everything is in /var/lib/clickhouse on the data volume. The manifest declares no backups, imports or actions.
Check the result
- From any service in the environment:
GET http://<app service name>:8123/pinganswersOk. - From this service's container:
clickhouse-client --user "$CLICKHOUSE_USER" --password "$CLICKHOUSE_PASSWORD" --query "SHOW DATABASES"
Обзор
Технический профиль ClickHouse
Версии
Репозиторий исходного кода
Публичный Helm-чарт
Постоянные тома
Стеки
Стеки, в которые входит ClickHouse
Конфигурация
Конфигурация сервиса ClickHouse
Технические домены
Тома