Recently, I just started to use nodejs and MongoDB in raspberry pi and want to deploy it through the balena cloud.
Thus, I made a docker-compose file and connected MongoDB through the client. Have a look at docker-compose file: https://www.dropbox.com/s/q3r7x8yx7wavc9j/docker-compose.yml?dl=0
Next, I created a
test database, and MongoDB service made some files on
data directory in the container, but when I restarted the MongoDB service through the balena cloud, the container data is wiped out. This may be an obvious reason, but as I bound the MongoDB container volume with
resin-data host volume, container volume data should be auto-synced with host volume in resin-data.
In host os, a resin-data directory has no data. Even, I checked in /var/lib/docker/volumes/_resin-data/_data directory, but It does not have the data,
Does anyone have any idea about how the host os volume can be auto sync with the container volume specific in MongoDB database?