Update docker doc for database persistence (#551)

Fix #550
This commit is contained in:
thelittlefireman 2020-12-21 16:57:44 +01:00 committed by GitHub
parent 8a87e76fe5
commit 9a1babc365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,8 @@ docker run -d -v config.yaml:/etc/crowdsec/config.yaml \
--name crowdsec <built-image-tag>
```
If you want to be able to restart/stop your container and keep the same DB `-v /path/myDatabase.db:/var/lib/crowdsec/data/crowdsec.db` you need to add a volume on local_api_credentials.yaml `-v /path/local_api_credentials.yaml:/etc/crowdsec/local_api_credentials.yaml`
### Environment Variables
* `COLLECTIONS` - Collections to install from the [hub](https://hub.crowdsec.net/browse/#collections), separated by space : `-e COLLECTIONS="crowdsecurity/linux crowdsecurity/apache2"`