#+TITLE: Persistent KV Store

#+BEGIN_SRC sh
docker build -t darklimericks-kv .
#+END_SRC

#+BEGIN_SRC sh :tangle run.sh :tangle-mode (identity #o755)
#!/usr/bin/env sh
set -euo pipefail

KVDATA=${KVDATA:-"$(pwd)/data/dev"}

docker run \
    -p 127.0.0.1:6379:6379 \
    -v $KVDATA:/data \
    --name kv \
    darklimericks-kv --appendonly yes
#+END_SRC

#+BEGIN_SRC sh :tangle start.sh :tangle-mode (identity #o755)
docker start darklimericks-kv
#+END_SRC
