forked from rysenko/mongodb-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (36 loc) · 1.13 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
###############################################################
# Example production and qa mongodb databases
##############################################################
mongoprod:
image: 'tutum/mongodb:latest'
environment:
- MONGODB_PASS=mypass
ports:
- "27017:27017"
- "28017:28017"
mongoqa:
image: 'tutum/mongodb:latest'
environment:
- MONGODB_PASS=mypass
ports:
- "37017:27017"
- "38017:28017"
###############################################################
# Example mongodb-sync container that syncs up the data
# every morning at 2:15am and archives a copy to S3.
##############################################################
mongodbsync:
image: 'agaveapi/mongodb-sync:latest'
links:
- 'mongoprod:mongodb-backup'
- 'mongoqa:mongodb-restore'
environment:
- CRON_TIME=15 2 * * * #Change to your favorate cron job schedule
- MAX_BACKUPS=10
- INIT_SYNC=yes
- AWS_ACCESS_KEY_ID=changeme
- AWS_SECRET_ACCESS_KEY=changeme
- S3_BUCKET=mynightlybackups
- S3_BACKUP=yes
volumes:
- /host/backup:/backup #Change to the host folder where you want to store the backups