Add readme
and update container's alpine
This commit is contained in:
parent
ba1a5f728c
commit
16aada55c5
2 changed files with 31 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
30
README.md
Normal file
30
README.md
Normal 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.
|
||||
Loading…
Reference in a new issue