add note about applying memory limit when running in swarm mode

This commit is contained in:
Frederik Ring 2021-08-05 21:56:19 +02:00
parent 5fd6f66324
commit e4bb183afa

View File

@ -110,6 +110,20 @@ volumes:
By default, Docker Swarm will restart stopped containers automatically, even when manually stopped. If you plan to have your containers / services stopped during backup, this means you need to apply the `on-failure` restart policy to your service's definitions. A restart policy of `always` is not compatible with this tool.
---
When running in Swarm mode, it's also advised to set a hard memory limit on your service (~25MB should be enough in that case):
```yml
services:
backup:
image: offen/docker-volume-backup:latest
deployment:
resources:
limits:
memory: 25M
```
## Manually triggering a backup
You can manually trigger a backup run outside of the defined cron schedule by executing the `backup` command inside the container: