Wednesday, 10 October 2018

MongoDB wipes whenever host does is down

I have a web api on a Digital Ocean Droplet. They recently did maintenance on the cluster my api is on. Afterwards, my Database is emptied of all data. This is the second time this has happened as a result of servers going down. Checking the file structure, I noticed there seems to be duplicate data, nested one level deeper.enter image description here

I have a feeling this block from docker compose might be the culprit.

mongo:
image: mongo:3.6
ports:
  - 27017:27017
volumes:
  - ./data/mongo:/data/db
networks:
  - my-api

What steps can I take to fix this issue?



from MongoDB wipes whenever host does is down

No comments:

Post a Comment