mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-13 07:15:48 +00:00
Update dependencies and bundle SQLite with the program, so we have one less dependency to install separately
This commit is contained in:
290
Cargo.lock
generated
290
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
15
Cargo.toml
15
Cargo.toml
@ -5,9 +5,9 @@ authors = ["Daniel García <dani-garcia@users.noreply.github.com>"]
|
||||
|
||||
[dependencies]
|
||||
# Web framework for nightly with a focus on ease-of-use, expressibility, and speed.
|
||||
rocket = { version = "0.3.8", features = ["tls"] }
|
||||
rocket_codegen = "0.3.8"
|
||||
rocket_contrib = "0.3.8"
|
||||
rocket = { version = "0.3.10", features = ["tls"] }
|
||||
rocket_codegen = "0.3.10"
|
||||
rocket_contrib = "0.3.10"
|
||||
|
||||
# HTTP client
|
||||
reqwest = "0.8.5"
|
||||
@ -16,14 +16,17 @@ reqwest = "0.8.5"
|
||||
multipart = "0.14.2"
|
||||
|
||||
# A generic serialization/deserialization framework
|
||||
serde = "1.0.43"
|
||||
serde_derive = "1.0.43"
|
||||
serde_json = "1.0.16"
|
||||
serde = "1.0.48"
|
||||
serde_derive = "1.0.48"
|
||||
serde_json = "1.0.17"
|
||||
|
||||
# A safe, extensible ORM and Query builder
|
||||
diesel = { version = "1.2.2", features = ["sqlite", "chrono", "r2d2"] }
|
||||
diesel_migrations = { version = "1.2.0", features = ["sqlite"] }
|
||||
|
||||
# Bundled SQLite
|
||||
libsqlite3-sys = { version = "0.9.1", features = ["bundled"] }
|
||||
|
||||
# Crypto library
|
||||
ring = { version = "= 0.11.0", features = ["rsa_signing"] }
|
||||
|
||||
|
11
Dockerfile
11
Dockerfile
@ -33,11 +33,11 @@ RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com
|
||||
# we need the Rust compiler and Cargo tooling
|
||||
FROM rustlang/rust:nightly as build
|
||||
|
||||
# Install the database libraries, in this case just sqlite3
|
||||
RUN apt-get update && apt-get install -y\
|
||||
sqlite3\
|
||||
--no-install-recommends\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Using bundled SQLite, no need to install it
|
||||
# RUN apt-get update && apt-get install -y\
|
||||
# sqlite3\
|
||||
# --no-install-recommends\
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Creates a dummy project used to grab dependencies
|
||||
RUN USER=root cargo new --bin app
|
||||
@ -68,7 +68,6 @@ FROM debian:stretch-slim
|
||||
|
||||
# Install needed libraries
|
||||
RUN apt-get update && apt-get install -y\
|
||||
sqlite3\
|
||||
openssl\
|
||||
--no-install-recommends\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
12
README.md
12
README.md
@ -1,6 +1,6 @@
|
||||
## Easy setup (Docker)
|
||||
Install Docker to your system and then, from the project root, run:
|
||||
```
|
||||
```sh
|
||||
# Build the docker image:
|
||||
docker build -t dani/bitwarden_rs .
|
||||
|
||||
@ -29,11 +29,11 @@ Where <absolute_path> is an absolute path in the hosts file system (e.g. C:\bitw
|
||||
## How to compile bitwarden_rs
|
||||
Install `rust nightly`, in Windows the recommended way is through `rustup`.
|
||||
|
||||
Install the `sqlite3`, and `openssl` libraries, in Windows the best option is Microsoft's `vcpkg`,
|
||||
Install the `openssl` library, in Windows the best option is Microsoft's `vcpkg`,
|
||||
on other systems use their respective package managers.
|
||||
|
||||
Then run:
|
||||
```
|
||||
```sh
|
||||
cargo run
|
||||
# or
|
||||
cargo build
|
||||
@ -63,7 +63,7 @@ Modify `web-vault/settings.Production.json` to look like this:
|
||||
```
|
||||
|
||||
Then, run the following from the `web-vault` dir:
|
||||
```
|
||||
```sh
|
||||
# With yarn (recommended)
|
||||
yarn
|
||||
yarn gulp dist:selfHosted
|
||||
@ -77,8 +77,8 @@ Finally copy the contents of the `web-vault/dist` folder into the `bitwarden_rs/
|
||||
|
||||
## How to recreate database schemas
|
||||
Install diesel-cli with cargo:
|
||||
```
|
||||
cargo install diesel_cli --no-default-features --features sqlite
|
||||
```sh
|
||||
cargo install diesel_cli --no-default-features --features sqlite-bundled # Or use only sqlite to use the system version
|
||||
```
|
||||
|
||||
Make sure that the correct path to the database is in the `.env` file.
|
||||
|
Reference in New Issue
Block a user