mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-10 06:59:55 +00:00
Updated dependencies and Docker image to new web-vault
This commit is contained in:
266
Cargo.lock
generated
266
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
14
Cargo.toml
@ -5,20 +5,20 @@ 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.14", features = ["tls"] }
|
||||
rocket_codegen = "0.3.14"
|
||||
rocket_contrib = "0.3.14"
|
||||
rocket = { version = "0.3.15", features = ["tls"] }
|
||||
rocket_codegen = "0.3.15"
|
||||
rocket_contrib = "0.3.15"
|
||||
|
||||
# HTTP client
|
||||
reqwest = "0.8.6"
|
||||
|
||||
# multipart/form-data support
|
||||
multipart = "0.14.2"
|
||||
multipart = "0.15.0"
|
||||
|
||||
# A generic serialization/deserialization framework
|
||||
serde = "1.0.70"
|
||||
serde_derive = "1.0.70"
|
||||
serde_json = "1.0.22"
|
||||
serde_json = "1.0.24"
|
||||
|
||||
# A safe, extensible ORM and Query builder
|
||||
diesel = { version = "1.3.2", features = ["sqlite", "chrono", "r2d2"] }
|
||||
@ -52,7 +52,7 @@ u2f = "0.1.2"
|
||||
dotenv = { version = "0.13.0", default-features = false }
|
||||
|
||||
# Lazy static macro
|
||||
lazy_static = "1.0.1"
|
||||
lazy_static = "1.0.2"
|
||||
|
||||
# Numerical libraries
|
||||
num-traits = "0.2.5"
|
||||
@ -63,4 +63,4 @@ num-derive = "0.2.2"
|
||||
jsonwebtoken = { path = "libs/jsonwebtoken" }
|
||||
|
||||
# Version 0.1.2 from crates.io lacks a commit that fixes a certificate error
|
||||
u2f = { git = 'https://github.com/wisespace-io/u2f-rs', rev = '193de35093a44' }
|
||||
u2f = { git = 'https://github.com/wisespace-io/u2f-rs', rev = '193de35093a44' }
|
||||
|
28
Dockerfile
28
Dockerfile
@ -2,31 +2,27 @@
|
||||
# https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# https://whitfin.io/speeding-up-rust-docker-builds/
|
||||
####################### VAULT BUILD IMAGE #######################
|
||||
FROM node:9-alpine as vault
|
||||
FROM node:8-alpine as vault
|
||||
|
||||
ENV VAULT_VERSION "1.27.0"
|
||||
ENV URL "https://github.com/bitwarden/web/archive/v${VAULT_VERSION}.tar.gz"
|
||||
#ENV VAULT_VERSION "v1.27.0"
|
||||
ENV VAULT_VERSION "master"
|
||||
ENV URL "https://github.com/bitwarden/web.git"
|
||||
|
||||
RUN apk add --update-cache --upgrade \
|
||||
curl \
|
||||
git \
|
||||
tar \
|
||||
&& npm install -g \
|
||||
gulp-cli \
|
||||
gulp
|
||||
|
||||
RUN mkdir /web-build \
|
||||
&& cd /web-build \
|
||||
&& curl -L "${URL}" | tar -xvz --strip-components=1
|
||||
tar
|
||||
|
||||
RUN git clone -b $VAULT_VERSION --depth 1 $URL web-build
|
||||
WORKDIR /web-build
|
||||
|
||||
COPY /docker/settings.Production.json /web-build/
|
||||
COPY docker/set-vault-baseurl.patch /web-build/
|
||||
RUN git apply set-vault-baseurl.patch
|
||||
|
||||
RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ \
|
||||
&& npm install \
|
||||
&& gulp dist:selfHosted \
|
||||
&& mv dist /web-vault
|
||||
RUN npm run sub:init && npm install
|
||||
|
||||
RUN npm run dist \
|
||||
&& mv build /web-vault
|
||||
|
||||
########################## BUILD IMAGE ##########################
|
||||
# We need to use the Rust build image, because
|
||||
|
16
docker/set-vault-baseurl.patch
Normal file
16
docker/set-vault-baseurl.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- a/src/app/services/services.module.ts
|
||||
+++ b/src/app/services/services.module.ts
|
||||
@@ -114,10 +114,9 @@ containerService.attachToWindow(window);
|
||||
|
||||
export function initFactory(): Function {
|
||||
return async () => {
|
||||
- const isDev = platformUtilsService.isDev();
|
||||
- if (!isDev && platformUtilsService.isSelfHost()) {
|
||||
- environmentService.baseUrl = window.location.origin;
|
||||
- }
|
||||
+ const isDev = false;
|
||||
+ environmentService.baseUrl = window.location.origin;
|
||||
+
|
||||
await apiService.setUrls({
|
||||
base: isDev ? null : window.location.origin,
|
||||
api: isDev ? 'http://localhost:4000' : null,
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"appSettings": {
|
||||
"apiUri": "/api",
|
||||
"identityUri": "/identity",
|
||||
"iconsUri": "/icons",
|
||||
"stripeKey": "",
|
||||
"braintreeKey": ""
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
nightly-2018-06-26
|
||||
nightly-2018-07-18
|
||||
|
@ -17,7 +17,7 @@ struct OrgData {
|
||||
Key: String,
|
||||
Name: String,
|
||||
#[serde(rename = "PlanType")]
|
||||
_PlanType: String, // Ignored, always use the same plan
|
||||
_PlanType: NumberOrString, // Ignored, always use the same plan
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![feature(plugin, custom_derive)]
|
||||
#![plugin(rocket_codegen)]
|
||||
#![allow(proc_macro_derive_resolution_fallback)] // TODO: Remove this when diesel update fixes warnings
|
||||
extern crate rocket;
|
||||
extern crate rocket_contrib;
|
||||
extern crate reqwest;
|
||||
|
Reference in New Issue
Block a user