Run the install script:
./scripts/install.sh
Client for ClickHouse and other databases. To install, run:
curl https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add -
echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list
sudo apt update
sudo apt install dbeaver-ce
See the docs for creating a connection.
Add aliases for frequently used commands to ~/.bash_aliases
:
# Start ClickHouse
alias ach="cd /path/to/dw-clickhouse && docker compose up -d"
# Stop ClickHouse
alias sch="cd /path/to/dw-clickhouse && docker compose down"
Set /path/to/
to the location of the repository on your machine. If you prefer to run the containers in the foreground, then omit the -d
option.
To delete all the data and Docker images, run:
./scripts/uninstall.sh
Start the ClickHouse container in detached mode:
docker compose up -d
If you prefer to run the containers in the foreground, then omit the -d
option.
The default settings for the ClickHouse server are:
Host: localhost
Port: 29000
Username: analyst
Password: analyst
Database: analytics
Examples:
Description | Command |
---|---|
Use clickhouse-client installed on host machine |
clickhouse-client -h localhost -p 29001 -u analyst --password analyst -d analytics |
Use clickhouse-client installed in container |
docker compose exec clickhouse clickhouse-client -u analyst --password analyst -d analytics |
Use psql installed on host machine |
psql -h localhost -p 29002 -U analyst -d analytics |
Ports can optionally be exposed. The configuration is loaded from ./.env
during startup.
Service | Port | Protocol |
---|---|---|
clickhouse |
29000 | HTTP |
clickhouse |
29001 | Native/TCP |
clickhouse |
29002 | Postgres emulation |
Copyright (c) 2023 Hein Bekker. Licensed under the GNU Affero General Public License, version 3.