How to mount a FileShare to a named volume in Azure App Service using Docker Compose?

76 Views Asked by At

I am using a Docker Compose file (docker-compose.yml) to initiate a container within my Azure App Service environment. My objective is to store the data generated within this container by utilizing volumes and directing them to my Azure Storage Account.

For this I have configured a named Volume in my docker-compose.yml

enter image description here

And used - Path Mappings under Configurations to Mount this Volume to my Azure Storage Account. enter image description here

With this Path mapping, I am able o see the data in my Azure Storage Account (FileShare). But upon restart of the App Service I see that the files mounted are not getting used by the App Service.

I Would like to understand the use of this Volumes in Docker Compose and Mounting (Path Mapping) in Azure App Service. What happens when an App Service with named Volumes in Docker Compose restarts?

NOTE: When I try to run the docker-compose.yml locally, Things are working good.

0

There are 0 best solutions below