Skip to content

Commit 930cdc5

Browse files
author
Abhishek Singh
committed
docker service documentation included in readme
1 parent 5fb5b1a commit 930cdc5

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,12 @@ This link also explains how to setup CurveZMQ encryption and ZAP authentication
320320
321321
# Docker Examples
322322
323+
The following `docker-compose` examples using the docker image `aosing/sqlite_rx`
324+
325+
`sqlite-server` CLI is used in all the docker examples
323326
324327
## In-memory SQLite Database
328+
325329
```yaml
326330
version: "3"
327331
services:
@@ -335,6 +339,8 @@ services:
335339
336340
## On Disk SQLite Database
337341
342+
docker volume is used to persist the database file on the host's file system
343+
338344
```yaml
339345
340346
version: "3"
@@ -352,9 +358,21 @@ volumes:
352358
data: {}
353359
```
354360
361+
- Named docker volume `data` is mounted to `/data` location in the container
362+
- `sqlite-server` CLI accepts `--database` option which is the database path in the container.
363+
Form is `/data/<dbname>.db`
364+
355365
356366
## SQLite Database server with CurveZMQ encryption
357367
368+
CurveZMQ is a protocol for secure messaging across the Internet that closely follows the CurveCP security handshake. `curve-keygen` is a script (packaged with sqlite_rx) which is modeled after `ssh-keygen` to generate public and private keys.
369+
Curve Key Generation uses an OpenSSH like directory: `~/.curve`
370+
371+
We need public keys for both servers and clients. We differentiate this by running the `curve-keygen` script in either client or server mode.
372+
373+
Once the keys have been generated, we can enable `CurveZMQ` encryption in the following
374+
way
375+
358376
```yaml
359377
360378
version: "3"
@@ -373,8 +391,19 @@ volumes:
373391
data: {}
374392
```
375393
394+
- `sqlite-server` CLI accepts `--curvezmq` boolean flag to enable encryption
395+
- `sqlite-server` CLI accepts `--key-id` which is the server key id available at `/root/.curve` location
396+
- `/Users/as/.curve` (on host machine) is mapped to `/root/.curve` in the docker container.
397+
398+
376399
## SQLite Database server with CurveZMQ encryption and ZAP authentication
377400
401+
ZeroMQ Authentication protocol
402+
403+
Setting `--zap = True` will restrict connections to clients whose public keys are in the `/root/.curve/authorized_clients/` directory. Set this to `False` to allow any client with the server's
404+
public key to connect, without requiring the server to possess each client's public key.
405+
406+
378407
```yaml
379408
380409
version: "3"

0 commit comments

Comments
 (0)