-
-
Save zibellon/43f6d460a274241a66d392fcdbd6a61f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
master: | |
image: docker:25.0.5-cli-alpine3.20 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
configs: | |
- source: swarm-backuper-sh | |
target: /swarm-backuper-sh.sh | |
mode: 0777 | |
entrypoint: [""] | |
command: > | |
sh -c " | |
apk add bash && apk add jq && | |
echo '0 3 * * * /swarm-backuper-sh.sh' > /etc/crontabs/root && | |
crond -f -L /dev/stdout | |
" | |
networks: | |
main-overlay-net: | |
aliases: | |
- swarm-backuper | |
deploy: | |
mode: replicated | |
replicas: 1 | |
placement: | |
constraints: | |
- node.role==manager | |
configs: | |
swarm-backuper-sh: | |
external: true | |
networks: | |
main-overlay-net: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment