Add readme

and update container's alpine
This commit is contained in:
Laurenz 2025-06-17 10:30:28 -07:00
parent ba1a5f728c
commit 16aada55c5
Signed by: C0ffeeCode
SSH key fingerprint: SHA256:prvFOyBjButRypyXm7X8lbbCkly2Dq1PF7e/mrsPVjw
2 changed files with 31 additions and 1 deletions

View file

@ -1,4 +1,4 @@
ARG alpine_version=3.21 ARG alpine_version=3.22
FROM docker.io/library/rust:1-alpine${alpine_version} AS builder FROM docker.io/library/rust:1-alpine${alpine_version} AS builder

30
README.md Normal file
View file

@ -0,0 +1,30 @@
# rvault
rvault is an open-source implementation of the API of Vault and OpenBao, written in Rust.
## Running
You can run an offline build with `SQLX_OFFLINE=true cargo run` or `build`, respectively.
An offline build requires an up-to-date SQLx preparation.
An OCI container image can be created using `podman build . -t rvault`.
Furthermore, rvault attempts to read a `.env` file in the current working directory.
For example, its content could be:
```txt
DATABASE_URL=sqlite:test.db
RUST_LOG=debug
```
## Development
SQLx preparation can be updated with `cargo sqlx prep`.
Hence, it is not useful for development.
With `cargo sqlx database reset` the database will be recreated,
deleting all contents and reapplying migrations.
This is helpful when changing migrations during development.
When running a normal, not-offline, build, the database must be migrated (e.g. using `cargo sqlx database reset`)
for compilation of compile-time-checked queries.