-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yml
More file actions
50 lines (47 loc) · 1.15 KB
/
compose.yml
File metadata and controls
50 lines (47 loc) · 1.15 KB
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
services:
docker-backup:
build: .
restart: unless-stopped
develop:
watch:
- action: rebuild
path: .
command:
- daemon
- --dashboard=:8080
- --storage=local-backups.type=local
- --storage=local-backups.path=/backups
- --default-storage=local-backups
- --log-level=info
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- backup-data:/backups
networks:
- backup-network
ports:
- "8080:8080"
# Example PostgreSQL container with backup labels
postgres:
image: postgres:16
environment:
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
POSTGRES_DB: myapp
labels:
- docker-backup.enable=true
- docker-backup.db.type=postgres
- docker-backup.db.schedule=0 3 * * *
- docker-backup.db.retention=7
- docker-backup.data.type=volume
- docker-backup.data.schedule=0 4 * * *
- docker-backup.data.retention=14
networks:
- backup-network
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
backup-network:
driver: bridge
volumes:
backup-data:
postgres-data: