diff --git a/Containerfile b/Containerfile index ba283db..724c9af 100644 --- a/Containerfile +++ b/Containerfile @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..357fc44 --- /dev/null +++ b/README.md @@ -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.