Skip to content

Commit

Permalink
Removed included web vault.
Browse files Browse the repository at this point in the history
Now that docker automatically downloads the web-vault, keeping it in the repo doesn't make sense.
Added error message in case someone tries to run the application directly without the web-vault instaled..
  • Loading branch information
dani-garcia committed Apr 24, 2018
1 parent 4093bf9 commit 3d454f3
Show file tree
Hide file tree
Showing 135 changed files with 27 additions and 12,319 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ data

# Environment file
# .env

# Web vault
web-vault
!web-vault/settings.Production.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cargo run
cargo build
```

## How to update the web-vault used
## How to install the web-vault locally
If you're using docker image, you can just update `VAULT_VERSION` variable in Dockerfile and rebuild the image.

Install `node.js` and either `yarn` or `npm` (usually included with node)
Expand Down
15 changes: 13 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ fn init_rocket() -> Rocket {
embed_migrations!();

fn main() {
println!("{:#?}", *CONFIG);

// Make sure the database is up to date (create if it doesn't exist, or run the migrations)
let connection = db::get_connection().expect("Can't conect to DB");
embedded_migrations::run_with_output(&connection, &mut io::stdout()).expect("Can't run migrations");

check_rsa_keys();
check_web_vault();

init_rocket().launch();
}
Expand Down Expand Up @@ -108,6 +107,18 @@ fn check_rsa_keys() {
}
}

fn check_web_vault() {
use std::path::Path;
use std::process::exit;

let index_path = Path::new(&CONFIG.web_vault_folder).join("index.html");

if !index_path.exists() {
println!("Web vault is not found. Please follow the steps in the README to install it");
exit(1);
}
}

lazy_static! {
// Load the config from .env or from environment variables
static ref CONFIG: Config = Config::load();
Expand Down
674 changes: 0 additions & 674 deletions web-vault/LICENSE.txt

This file was deleted.

15 changes: 0 additions & 15 deletions web-vault/app-id.json

This file was deleted.

7 changes: 0 additions & 7 deletions web-vault/app/accounts/views/accountsLogin.html

This file was deleted.

49 changes: 0 additions & 49 deletions web-vault/app/accounts/views/accountsLoginInfo.html

This file was deleted.

167 changes: 0 additions & 167 deletions web-vault/app/accounts/views/accountsLoginTwoFactor.html

This file was deleted.

32 changes: 0 additions & 32 deletions web-vault/app/accounts/views/accountsOrganizationAccept.html

This file was deleted.

39 changes: 0 additions & 39 deletions web-vault/app/accounts/views/accountsPasswordHint.html

This file was deleted.

Loading

0 comments on commit 3d454f3

Please sign in to comment.