-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
42 lines (37 loc) · 1.25 KB
/
docker-compose.yaml
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
version: "3"
services:
# 1) first build the image
# > docker compose build
build:
image: autobackup
build:
dockerfile: Dockerfile
context: .
# 2) Configure meocloud (if not needed, just set USE_MEOCLOUD to "0" below, or comment the line and skip this step)
# Create empty meocloud config:
# > touch /mnt/backup/meocloud.conf
# initiate meocloud config
# > docker compose run --rm init
init:
image: autobackup
environment:
TZ: Europe/Lisbon #changeme
command: "meocloud --init"
volumes:
- /mnt/backup/meocloud.conf:/etc/meocloud.conf
# 3) start backing up (check abackup_schedule.sh cron.d examples for usage)
# > docker compose run --rm backup ...
# Note you can create an exclude.list file inside the config dir with paths to exclude
backup:
image: autobackup
hostname: serverd #changeme
environment:
TZ: Europe/Lisbon #changeme
USE_MEOCLOUD: "1" # change to zero if not needed, or comment the line
volumes:
- /mnt/backup/config:/app/config
- /mnt/backup/store:/store
- /mnt/backup/meocloud.conf:/etc/meocloud.conf
- /var/log:/host/var/log:ro
- /etc:/host/etc:ro
# mount whatever you want to be backed up from the host into /backup/...