Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
- Updated to rust 1.73.0
- Updated crates
- Updated documentation
- Added a bake.sh script to make baking easier
  • Loading branch information
BlackDex committed Oct 8, 2023
1 parent 13f73ed commit c8e129b
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 55 deletions.
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "vaultwarden"
version = "1.0.0"
authors = ["Daniel García <[email protected]>"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.71.1"
resolver = "2"

repository = "https://github.com/dani-garcia/vaultwarden"
Expand Down Expand Up @@ -75,7 +75,7 @@ serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"

# A safe, extensible ORM and Query builder
diesel = { version = "2.1.2", features = ["chrono", "r2d2"] }
diesel = { version = "2.1.3", features = ["chrono", "r2d2"] }
diesel_migrations = "2.1.0"
diesel_logger = { version = "0.3.0", optional = true }

Expand Down Expand Up @@ -141,6 +141,9 @@ cookie_store = "0.19.1"

# Used by U2F, JWT and PostgreSQL
openssl = "0.10.57"
# Set openssl-sys fixed to v0.9.92 to prevent building issues with musl, arm and 32bit pointer width
# It will force add a dynamically linked library which prevents the build from being static
openssl-sys = "=0.9.92"

# CLI argument parsing
pico-args = "0.5.0"
Expand All @@ -163,10 +166,6 @@ argon2 = "0.5.2"
# Reading a password from the cli for generating the Argon2id ADMIN_TOKEN
rpassword = "7.2.0"

# Set openssl-sys fixed to v0.9.92 to prevent building issues with musl, arm and 32bit pointer width
# It will force add a dynamically linked library which prevents the build from being static
openssl-sys = "=0.9.92"


[patch.crates-io]
rocket = { git = 'https://github.com/SergioBenitez/Rocket', rev = 'ce441b5f46fdf5cd99cb32b8b8638835e4c2a5fa' } # v0.5 branch
Expand Down
4 changes: 2 additions & 2 deletions docker/DockerSettings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
vault_version: "v2023.8.2"
vault_image_digest: "sha256:b361e79309ef2c4368f880f350166daade41eb0927a9adf376c76e3713027252" # v2023.8.2
rust_version: 1.72.1 # Rust version to be used
vault_image_digest: "sha256:b361e79309ef2c4368f880f350166daade41eb0927a9adf376c76e3713027252"
rust_version: 1.73.0 # Rust version to be used
debian_version: bookworm # Debian release name to be used
alpine_version: 3.18 # Alpine version to be used
# For which platforms/architectures will we try to build images
Expand Down
11 changes: 5 additions & 6 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ FROM --platform=linux/amd64 docker.io/vaultwarden/web-vault@sha256:b361e79309ef2
########################## ALPINE BUILD IMAGES ##########################
## NOTE: The Alpine Base Images do not support other platforms then linux/amd64
## And for Alpine we define all build images here, they will only be loaded when actually used
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:x86_64-musl-stable-1.72.1 as build_amd64
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:aarch64-musl-stable-1.72.1 as build_arm64
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:armv7-musleabihf-stable-1.72.1 as build_armv7
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:arm-musleabi-stable-1.72.1 as build_armv6
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:x86_64-musl-stable-1.73.0 as build_amd64
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:aarch64-musl-stable-1.73.0 as build_arm64
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:armv7-musleabihf-stable-1.73.0 as build_armv7
FROM --platform=linux/amd64 ghcr.io/blackdex/rust-musl:arm-musleabi-stable-1.73.0 as build_armv6

########################## BUILD IMAGE ##########################
# hadolint ignore=DL3006
Expand Down Expand Up @@ -81,8 +81,7 @@ ARG DB=sqlite,mysql,postgresql,enable_mimalloc
RUN source /env-cargo && \
rustup target add "${CARGO_TARGET}"

# ARG CARGO_PROFILE=release
ARG CARGO_PROFILE=dev
ARG CARGO_PROFILE=release

# Builds your dependencies and removes the
# dummy project, except the target folder
Expand Down
5 changes: 2 additions & 3 deletions docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx:master AS xx

########################## BUILD IMAGE ##########################
# hadolint ignore=DL3006
FROM --platform=$BUILDPLATFORM docker.io/library/rust:1.72.1-slim-bookworm as build
FROM --platform=$BUILDPLATFORM docker.io/library/rust:1.73.0-slim-bookworm as build
COPY --from=xx / /
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down Expand Up @@ -100,8 +100,7 @@ ARG DB=sqlite,mysql,postgresql
RUN source /env-cargo && \
rustup target add "${CARGO_TARGET}"

# ARG CARGO_PROFILE=release
ARG CARGO_PROFILE=dev
ARG CARGO_PROFILE=release

# Builds your dependencies and removes the
# dummy project, except the target folder
Expand Down
3 changes: 1 addition & 2 deletions docker/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ ARG DB=sqlite,mysql,postgresql,enable_mimalloc
RUN source /env-cargo && \
rustup target add "${CARGO_TARGET}"

# ARG CARGO_PROFILE=release
ARG CARGO_PROFILE=dev
ARG CARGO_PROFILE=release

# Builds your dependencies and removes the
# dummy project, except the target folder
Expand Down
Loading

0 comments on commit c8e129b

Please sign in to comment.