I have an app that runs as a docker container, the app connects to another container which is Mongodb, I want to mount the mongodb volume data/db
to Azure share files. I am using docker compose file to define my containers. Assuming that I already have a storage account linked to the app, this is how I define my docker volume in docker-compose
database:
image: "mongo:latest"
container_name: database
ports:
- "27017:27017"
volumes:
- ${WEBAPP_STORAGE_HOME}/data/db:/data/db
In Unable to mount azure file shares as mongodb volume in azure container instances it was mentioned that mounting data/db
is not recommended and it won't work. My question is:
How can I mount my mongodb files to Azure files ? how to perform back-ups to those files? and if i want to restore a backup to the database would it be possible to just upload the files in the azure files and see them in my mongodb ?