Skip to content

Commit

Permalink
chore: final pre-release updates (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored Nov 9, 2023
1 parent 7e77d08 commit 89a33fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

steps:
- uses: actions/checkout@v3
Expand All @@ -30,7 +31,7 @@ jobs:
uses: arduino/setup-protoc@v2
with:
version: "21.12"
token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check formatting
run: cargo fmt -- --check
Expand Down Expand Up @@ -102,4 +103,5 @@ jobs:
cargo publish -vv -p denokv_proto
cargo publish -vv -p denokv_sqlite
cargo publish -vv -p denokv_remote
cargo publish -vv -p denokv_timemachine
cargo publish -vv -p denokv
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ LABEL org.opencontainers.image.licenses=MIT

COPY --from=builder /usr/src/denokv/target/release/denokv /usr/local/bin/

ENTRYPOINT ["/usr/local/bin/denokv"]
ENTRYPOINT ["/usr/local/bin/denokv"]
CMD ["serve"]
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Then run the `denokv` Docker image, mounting the `/data` directory as a volume
and specifying a random access token.

```sh
docker run -it --init -p 4512:4512 -v ./data:/data ghcr.io/denoland/denokv --sqlite-path /data/denokv.sqlite serve --access-token <random-token>
docker run -it --init -p 4512:4512 -v ./data:/data ghcr.io/denoland/denokv serve --sqlite-path /data/denokv.sqlite --access-token <random-token>
```

You can now access the database from your Deno programs by specifying the access
Expand Down Expand Up @@ -142,6 +142,14 @@ period of inactivity will be slow, as the database needs to be started. You can
avoid this by setting `min_machines_running` to `1`, and setting
`auto_stop_machines = false`.

### Install binary

You can download a prebuilt binary from the
[releases page](https://github.com/denoland/denokv/releases/tag/0.1.0) and place
it in your `PATH`.

You can also compile from source by running `cargo install denokv --locked`.

## How to connect

### Deno
Expand All @@ -155,9 +163,14 @@ const kv = await Deno.openKv("http://localhost:4512");
Make sure to specify your access token in the `DENO_KV_ACCESS_TOKEN` environment
variable.

## Running as a replica of a hosted KV database
<!-- TBD: ### Node.js -->

## Advanced setup

### Running as a replica of a hosted KV database

`denokv` has a mode for running as a replica of a KV database hosted on Deno Deploy through the S3 backup feature.
`denokv` has a mode for running as a replica of a KV database hosted on Deno
Deploy through the S3 backup feature.

To run as a replica:

Expand Down Expand Up @@ -188,10 +201,6 @@ To checkout the snapshot at a specific recoverable point:
denokv --sqlite-path /data/denokv.sqlite pitr checkout 0100000002c0f4c10000
```

<!-- TBD: ### Node.js -->

## Advanced setup

### Continuous backup using LiteFS

TODO
Expand Down

0 comments on commit 89a33fc

Please sign in to comment.