Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Change Docker volume used by Clickhouse to a local directory (#404)

Johan Fagerbergf7885a93d7da
diff --git a/.gitignore b/.gitignore
index d3e8509c27..606074d1df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,9 @@ plausible-*.tar
# If NPM crashes, it generates a log, let's ignore it too.
npm-debug.log
+# If running Clickhouse through the Makefile, its data is written here
+/.clickhouse_db_vol/
+
# The directory NPM downloads your dependencies sources to.
/assets/node_modules/
/tracker/node_modules/
diff --git a/Makefile b/Makefile
index 5e95ac8144..ff3bcb13e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
clickhouse:
- docker run --detach -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$HOME/clickhouse_db_vol:/var/lib/clickhouse yandex/clickhouse-server
+ docker run --detach -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$PWD/.clickhouse_db_vol:/var/lib/clickhouse yandex/clickhouse-server
postgres:
docker run --detach -e POSTGRES_PASSWORD="postgres" -p 5432:5432 postgres