This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/kvrocks-website.git
The following commit(s) were added to refs/heads/main by this push:
new 6064b34 Update getting-started.md (#196)
6064b34 is described below
commit 6064b345d3069e4d0b372e7cda4480bf56fb8bd0
Author: Jeff Ferber <[email protected]>
AuthorDate: Thu Feb 8 01:05:33 2024 -0500
Update getting-started.md (#196)
---
docs/getting-started.md | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/docs/getting-started.md b/docs/getting-started.md
index dbc665e..cf00ebf 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -22,6 +22,38 @@ Now you can use the `redis-cli` to run the kvrocks server as
Redis on port `6666
redis-cli -p 6666
```
+For persisted data, prefer using a docker volume over a bind-mounted volume to
avoid file permission or performance problems. Eg:
+```sh
+# create docker volume once, eg:
+docker volume create kvrocks_data
+
+docker run --volume kvrocks_data:/kvrocks_data \
+ --interactive --tty --publish 6666:6666 apache/kvrocks:2.7.0 --bind 0.0.0.0
--dir /kvrocks_data
+
+# note: the default data dir is /var/lib/kvrocks. The above example changes
the location from default to /kvrocks_data.
+```
+
+### Tuning Docker
+
+Any command line switches in the the Docker CMD position are passed to the
kvrocks app. For example, to change the "workers" setting from default to 16,
you could include `--workers 16`
+
+```shell
+docker run -it --rm -p 6666:6666 apache/kvrocks --bind 0.0.0.0 --workers 16
+```
+
+To set an admin password, use the `requirepass` directive:
+
+```shell
+# assuming password exported on environment variable "KVROCKS_ADMIN_SECRET":
+docker run -it --rm -p 6666:6666 apache/kvrocks --bind 0.0.0.0 --requirepass
$KVROCKS_ADMIN_SECRET
+
+# redis-cli on host looks like:
+REDISCLI_AUTH=$KVROCKS_ADMIN_SECRET redis-cli -p 6666 ping
+```
+
+Alternatively, you might mount the entire
[kvrocks.conf](https://github.com/apache/kvrocks/blob/v2.7.0/kvrocks.conf) file
to the container. The default config location is
`/var/lib/kvrocks/kvrocks.conf`. NOTE: if bind-mounting, it must be an entire
directory (and so would look like `./my_conf_dir:/var/lib/kvrocks`.) To change
the config file location, override the Docker entrypoint. (See Dockerfile as a
guideline.)
+
+
## Build and run Kvrocks from source
### Install dependencies