From 8f3a156c55400328c31cbee54286a2d4ad8df64e Mon Sep 17 00:00:00 2001 From: Nils Domrose Date: Mon, 3 Jun 2019 09:51:13 +0200 Subject: [PATCH] Created Using MySQL Backend (markdown) --- Using-MySQL-Backend.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Using-MySQL-Backend.md diff --git a/Using-MySQL-Backend.md b/Using-MySQL-Backend.md new file mode 100644 index 0000000..14080e9 --- /dev/null +++ b/Using-MySQL-Backend.md @@ -0,0 +1,21 @@ +To use the MySQL backend, first ensure you build the binary [with MySQL feature enabled](https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary#mysql-backend). + +To run the binary or container ensure the ```DATABASE_URL``` environment variable is set (i.e. ```DATABASE_URL='mysql://:@mysql/bitwarden```). + +Example using docker +``` +# Start a mysql container +docker run --name mysql --net \ + -e MYSQL_ROOT_PASSWORD=\ + -e MYSQL_DATABASE=bitwarden\ + -e MYSQL_USER=\ + -e MYSQL_PASSWORD= -d mysql:5.7 + +# Start bitwarden_rs with MySQL Env Vars set. +docker run -d --name bitwarden --net \ + -v $(pwd)/bw-data/:/data/ -v :/ssl/\ + -p 443:80 -e ROCKET_TLS='{certs="/ssl/",key="/ssl/"}'\ + -e RUST_BACKTRACE=1 -e DATABASE_URL='mysql://:@mysql/bitwarden'\ + -e ADMIN_TOKEN=\ + -e ENABLE_DB_WAL='false' +``` \ No newline at end of file