-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (50 loc) · 1.3 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: '3.8'
services:
bkops:
image: ethraza/backupops:latest
build:
context: .
dockerfile: Dockerfile
container_name: backup-ops
hostname: bkops.{{.Node.Hostname}}
# command: ["borg", "init", "--encryption", "none"]
environment:
BOPS_SSH: "on"
# BOPS_SSH_OPT: "-e -D"
# BOPS_KEEP_RUNNING: "on"
BORG_REPO: "/backup/repo"
BORG_BASE_DIR: "/backup"
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK: "yes"
BORG_RELOCATED_REPO_ACCESS_IS_OK: "yes"
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: none
placement:
# constraints:
# - "node.labels.storage == 1"
preferences:
- spread: node.labels.storage
labels:
- "swarm.cronjob.enable=false"
- "swarm.cronjob.schedule=10 1 * * *"
- "swarm.cronjob.skip-running=true"
ports:
- target: 22
protocol: tcp
mode: ingress
# extra_hosts:
# - "mysql01.localdomain:192.168.0.192"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /mnt/storage/backup/script:/docker-entrypoint.d
- /mnt/storage/backup:/backup
- /:/host
- /tmp:/tmp
networks:
- default
networks:
default:
external: true