Last active
June 22, 2021 16:49
Star
You must be signed in to star a gist
Run clickhouse locally and metabase in a docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin bash | |
# install clickhouse locally | |
sudo apt install clickhouse-server clickhouse-client | |
# download latest driver for metabase+clickhouse | |
mkdir metabase-plugins | |
wget https://github.com/enqueue/metabase-clickhouse-driver/releases/download/0.7.5/clickhouse.metabase-driver.jar -P metabase-plugins/ | |
# boot container, mapping plugin dir and exposing current host as `host.docker.internal` | |
docker run -d -p 3000:3000 \ | |
--add-host=host.docker.internal:host-gateway \ | |
--mount type=bind,source=$(pwd)/metabase-plugins,destination=/plugins \ | |
--name metabase metabase/metabase | |
# open metabase in browser | |
google-chrome http://localhost:3000 | |
# follow setup wizard | |
# - choose `clickhouse` as the driver | |
# - use `host.docker.internal` as the host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To verify connectivity, you can
curl
clickhouse from the container, and should receiveOk.
as a response: