-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose.yml
78 lines (74 loc) · 2.1 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# prep
include:
- path: compose.prep.yml
services:
fms:
profiles:
- live
image: ${IMAGE:-fms}:$TAG_PREFIX${TAG_PREFIX:+-}$VERSION-u$UBUNTU-${PROCESSOR:-amd}${TAG_SUFFIX:+-}$TAG_SUFFIX
container_name: fms
hostname: fms
privileged: true
stop_grace_period: 0s
ports:
# - 80:80
# - 443:443
# - 2399:2399
- 5003:5003
# - 16001:16001
volumes:
# Volumes
- fms:/opt/FileMaker/FileMaker Server
- devin:/opt/Devin
# Mounts
- ${FILES_MOUNT:-./mounts/files}:/opt/FileMaker/FileMaker Server/Data/Databases/RC_Data_FMS:rw
- ${BACKUPS_MOUNT:-./mounts/backups}:/opt/FileMaker/FileMaker Server/Data/Backups:rw
- ${CLONES_MOUNT:-./mounts/clones}:/opt/FileMaker/FileMaker Server/Data/ClonesOnly:rw
# Sync time with host
- /etc/localtime:/etc/localtime:ro
# backup/restore
backup:
profiles:
- backup
image: ubuntu:22.04
container_name: fms-dev-backup
hostname: fms-dev-backup
stop_grace_period: 0s
volumes:
- fms:/fms:ro
- devin:/devin:ro
- ${DEV_BACKUP_MOUNT:-./mounts/dev-backup}:/backup
# Sync timezone
- /etc/localtime:/etc/localtime:ro
environment:
FMS_VOL: ${FMS_VOL:-fms}
DEVIN_VOL: ${DEVIN_VOL:-devin}
command: bash -c "
export timestamp=$(date +%Y-%m-%d-%H-%M-%S);
mkdir /backup/$$timestamp;
tar czvf /backup/$$timestamp/$$FMS_VOL.tar.gz -C /fms .;
tar czvf /backup/$$timestamp/$$DEVIN_VOL.tar.gz -C /devin ."
restore:
profiles:
- restore
image: ubuntu:22.04
container_name: fms-dev-restore
hostname: fms-dev-restore
stop_grace_period: 0s
volumes:
- fms:/vol/fms
- devin:/vol/devin
- ${DEV_BACKUP_MOUNT:-./mounts/dev-backup}:/backups
environment:
FMS_VOL: ${FMS_VOL:-fms}
DEVIN_VOL: ${DEVIN_VOL:-devin}
command: bash -c "
cd /backups;
cd "$(ls -Art | tail -n 1)";
tar xzvf ./$$FMS_VOL.tar.gz -C /vol/fms;
tar xzvf ./$$DEVIN_VOL.tar.gz -C /vol/devin"
volumes:
fms:
name: ${FMS_VOL:-fms}
devin:
name: ${DEVIN_VOL:-devin}