Skip to content

Commit

Permalink
(+semver: patch) Add kvetchctl to docker image (#9)
Browse files Browse the repository at this point in the history
Also fix up the docs.
  • Loading branch information
dkaminski authored Jul 31, 2020
1 parent a760834 commit e241e7c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ FROM ubuntu:18.04 as final
ENV GOMAXPROCS 128
EXPOSE 7777
WORKDIR /app
COPY --from=0 /artifacts/linux/kvetchctl /app/
COPY --from=0 /build/kvetch /app/
CMD ["/app/kvetch"]
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@ Kvetch is a small gRPC wrapper around the [Badger](https://github.com/dgraph-io/
Run the Kvetch container in Docker:

```bash
docker run --rm -v $PWD/data:/data -e DATASTORE=/data -p 7777:7777 syncromatics/kvetch:0.4.0
docker run --rm -v $PWD/data:/data -e DATASTORE=/data -p 7777:7777 syncromatics/kvetch:v0.5.1
```

Interact with Kvetch using `kvetchctl`:

```bash
GO111MODULE=on go get github.com/syncromatics/kvetch/cmd/[email protected]
export KVETCHCTL_ENDPOINT=localhost:7777 # host:port of Kvetch instance
kvetchctl set example/1 "first value"
kvetchctl set example/2 "second value"
kvetchctl set example/3 "third value"
kvetchctl get --prefix example/
```

It is also possible to run both `kvetch` and `kvetchctl` in the same docker container:

```bash
docker run -it --rm syncromatics/kvetch:v0.5.1 bash
DATASTORE=/data ./kvetch &
export KVETCHCTL_ENDPOINT=localhost:7777
./kvetchctl set example/1 "first value"
./kvetchctl set example/2 "second value"
./kvetchctl set example/3 "third value"
./kvetchctl get --prefix example/
```

More `kvetchctl` documentation is available in [docs/kvetchctl](docs/kvetchctl/kvetchctl.md)

## Building
Expand Down

0 comments on commit e241e7c

Please sign in to comment.