docker-compose.yaml 443 B

123456789101112131415161718192021
  1. version: '3.8'
  2. # 网络
  3. networks:
  4. default:
  5. external:
  6. name: default-network # 与需要备份的mongo在同一个网络
  7. services:
  8. # mgob
  9. mgob:
  10. image: stefanprodan/mgob:1.1
  11. container_name: mongo-backup
  12. restart: always
  13. ports:
  14. - 8090:8090
  15. volumes:
  16. - ./config:/config
  17. - ~/data/mongobackupdata/storage:/storage
  18. - ~/data/mongobackupdata/tmp:/tmp
  19. - ~/data/mongobackupdata/data:/data