aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMiroslav Prasil <[email protected]>2018-07-18 10:40:46 +0100
committerMiroslav Prasil <[email protected]>2018-07-18 10:41:39 +0100
commit06f7bd7c976b78c5e490c03f016c9713026c161f (patch)
tree9a31876bd539974132fdf804786e2cece2c5d1dc /README.md
parent458a238c3810f0af2829bfc8878240014fd11504 (diff)
downloadvaultwarden-06f7bd7c976b78c5e490c03f016c9713026c161f.tar.gz
vaultwarden-06f7bd7c976b78c5e490c03f016c9713026c161f.zip
Change number of workers in image, document the setting (fixes #90)
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index f47c44c7..f05a6e96 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ _*Note, that this project is not associated with the [Bitwarden](https://bitward
- [attachments location](#attachments-location)
- [icons cache](#icons-cache)
- [Changing the API request size limit](#changing-the-api-request-size-limit)
+ - [Changing the number of workers](#changing-the-number-of-workers)
- [Other configuration](#other-configuration)
- [Building your own image](#building-your-own-image)
- [Building binary](#building-binary)
@@ -233,6 +234,20 @@ docker run -d --name bitwarden \
mprasil/bitwarden:latest
```
+### Changing the number of workers
+
+When you run bitwarden_rs, it spawns `2 * <number of cpu cores>` workers to handle requests. On some systems this might lead to low number of workers and hence slow performance, so the default in the docker image is changed to spawn 10 threads. You can override this setting to increase or decrease the number of workers by setting the `ROCKET_WORKERS` variable.
+
+In the example bellow, we're starting with 20 workers:
+
+```sh
+docker run -d --name bitwarden \
+ -e ROCKET_WORKERS=20 \
+ -v /bw-data/:/data/ \
+ -p 80:80 \
+ mprasil/bitwarden:latest
+```
+
### Other configuration
Though this is unlikely to be required in small deployment, you can fine-tune some other settings like number of workers using environment variables that are processed by [Rocket](https://rocket.rs), please see details in [documentation](https://rocket.rs/guide/configuration/#environment-variables).