mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-19 08:17:11 +03:00
76beca31cc
* change clickhouse `extraConfig` type to yaml * update clickhouse doc
1.1 KiB
1.1 KiB
Clickhouse
ClickHouse is an open-source column-oriented DBMS (columnar database management system) for online analytical processing (OLAP) that allows users to generate analytical reports using SQL queries in real-time.
Getting Started
# In `perSystem.process-compose.<name>`
{
services.clickhouse."clickhouse-1".enable = true;
}
{#tips}
Tips & Tricks
{#change-port}
Change the HTTP default port
Clickhouse has HTTP Interface that is enabled by default on port 8123. To change the default port, use the extraConfig
option:
{
services.clickhouse."clickhouse-1" = {
enable = true;
extraConfig = {
http_port = 9050
};
};
}
{#initial-database}
Initial database schema
To load a database schema, you can use the initialDatabases
option:
{
services.clickhouse."clickhouse-1" = {
enable = true;
initialDatabases = [
{
name = "sample_db";
schemas = [ ./test.sql ];
}
# or just create the database:
{
name = "sample_db_without_schema";
}
];
};
}