-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbackup.docker-compose.yml
154 lines (144 loc) · 4.17 KB
/
backup.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: "3.7"
services:
create-backup-folder:
image: busybox:latest
command: ["sh", "-c", "mkdir -p /mnt/$$BACKUP_FOLDER"]
environment:
BACKUP_FOLDER: ${BACKUP_FOLDER}
volumes:
- "${BACKUP_PATH:-backup-path}:/mnt"
#
# MySQL backups
#
openmrs-db-backup:
image: mekomsolutions/mysql_backup:latest
depends_on:
create-backup-folder:
condition: service_completed_successfully
environment:
DB_HOST: openmrs-mysql
DB_NAME: openmrs
DB_USERNAME: ${OPENMRS_DB_USER}
DB_PASSWORD: ${OPENMRS_DB_PASSWORD}
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
networks:
bahmni:
aliases:
- openmrs-db-backup
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
eip-client-backup:
image: mekomsolutions/mysql_backup:latest
depends_on:
create-backup-folder:
condition: service_completed_successfully
environment:
DB_HOST: mysql
DB_NAME: ${EIP_DB_NAME}
DB_USERNAME: ${EIP_DB_USER}
DB_PASSWORD: ${EIP_DB_PASSWORD}
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
networks:
bahmni:
aliases:
- openmrs-db-backup
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
#
# PostgreSQL backpus
#
odoo-db-backup:
depends_on:
create-backup-folder:
condition: service_completed_successfully
image: mekomsolutions/postgres_backup:latest
environment:
DB_HOST: odoo-postgresql
DB_NAME: odoo
DB_USERNAME: ${ODOO_DB_USER}
DB_PASSWORD: ${ODOO_DB_PASSWORD}
DB_PORT: 5432
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
networks:
bahmni:
aliases:
- odoo-db-backup
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
openelis-db-backup:
depends_on:
create-backup-folder:
condition: service_completed_successfully
image: mekomsolutions/postgres_backup:latest
environment:
DB_HOST: postgresql
DB_NAME: ${OPENELIS_DB_NAME}
DB_USERNAME: ${OPENELIS_DB_USER}
DB_PASSWORD: ${OPENELIS_DB_PASSWORD}
DB_PORT: 5432
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
networks:
bahmni:
aliases:
- openelis-db-backup
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
#
# Filestore backups
#
bahmni-home-backup:
depends_on:
create-backup-folder:
condition: service_completed_successfully
image: mekomsolutions/filestore_backup:latest
environment:
FILESTORE_PATH: /mnt/home
FILENAME: bahmni-home
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
- ${BAHMNI_HOME_PATH:-bahmni-home}:/mnt/home
odoo-filestore-backup:
depends_on:
create-backup-folder:
condition: service_completed_successfully
image: mekomsolutions/filestore_backup:latest
environment:
FILESTORE_PATH: /mnt/odoo
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
FILENAME: odoo-filestore
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
- ${ODOO_FILESTORE:-odoo-filestore}:/mnt/odoo
odoo-checksum-backup:
depends_on:
create-backup-folder:
condition: service_completed_successfully
image: mekomsolutions/filestore_backup:latest
environment:
FILESTORE_PATH: /mnt/odoo_config_checksum
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
FILENAME: odoo-checksum
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
- "${ODOO_CONFIG_CHECKSUM_PATH:-odoo-checksums}:/mnt/odoo_config_checksum"
openmrs-checksum-backup:
image: mekomsolutions/filestore_backup:latest
depends_on:
create-backup-folder:
condition: service_completed_successfully
environment:
FILESTORE_PATH: /mnt/openmrs_config_checksum
BACKUP_PATH: "/opt/backup/${BACKUP_FOLDER}"
FILENAME: openmrs-checksum
volumes:
- "${BACKUP_PATH:-backup-path}:/opt/backup/"
- "${OPENMRS_CONFIG_CHECKSUM_PATH:-openmrs-config-checksums}:/mnt/openmrs_config_checksum"
volumes:
backup-path: ~
odoo-filestore: ~
bahmni-home: ~
odoo-checksums: ~
openmrs-config-checksums: ~
networks:
bahmni: