Skip to content

Commit

Permalink
adding backups
Browse files Browse the repository at this point in the history
  • Loading branch information
cintiadr committed Feb 6, 2021
1 parent d0e0595 commit ae24732
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
14 changes: 13 additions & 1 deletion files/plir-opencr/docker-compose.yml
Expand Up @@ -50,7 +50,19 @@ services:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
timeout: 20s


backup:
image: openmrsinfra/cron-backup:latest
depends_on:
- es
volumes:
- data01:/es_data
- ${BACKUP_DIR-./backups}:/backup
environment:
- DIRS=/es_data:plir_es_data
- SCHEDULE=0 0 * * *
restart: always
healthcheck:
test: "exit 0"

volumes:
data01:
Expand Down
19 changes: 19 additions & 0 deletions files/plir-openhim/docker-compose.yml
Expand Up @@ -7,6 +7,22 @@ services:
expose:
- "27017"
image: mongo:3.4
volumes:
- mongodb_data:/data/db
healthcheck:
test: "exit 0"

backup:
image: openmrsinfra/cron-backup:latest
depends_on:
- mongo-plir
volumes:
- mongodb-data:/mongodb-data
- ${BACKUP_DIR-./backups}:/backup
environment:
- DIRS=/mongodb-data:plir_openmhinm_data
- SCHEDULE=0 0 * * *
restart: always
healthcheck:
test: "exit 0"

Expand Down Expand Up @@ -43,3 +59,6 @@ services:
volumes:
- ./default.json:/usr/share/nginx/html/config/default.json

volumes:
mongodb_data:
driver: local

0 comments on commit ae24732

Please sign in to comment.