Web App Docker Compose Persistent Storage

Ted 117 Reputation points
2020-09-15T12:29:24.433+00:00

Hello,

I have a web app hosting a docker compose multi container.
I have set the Service_Storage app settings to TRUE
I have added the Path Mapping to my Azure File storage
In my compose yaml I have
volumes:

  • ${WEBAPP_STORAGE_HOME}/site/wwwroot/config:/var/www/html/contao/config
  • ${WEBAPP_STORAGE_HOME}/site/wwwroot/system/config:/var/www/html/contao/system/config
  • ${WEBAPP_STORAGE_HOME}/site/wwwroot/templates:/var/www/html/contao/templates
  • ${WEBAPP_STORAGE_HOME}/site/wwwroot/var/logs:/var/www/html/contao/var/logs

Still I can't see the mapped files. I only see the default files created by the application when starting stored locally in the container and not in the Azure File.

Am I missing something ?

Thanks in advance,
Teddy

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,642 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ted 117 Reputation points
    2020-10-16T15:29:06.26+00:00

    Hello,

    small update: we could figure out where the problem comes with the support.

    When mounting an Azure File on the App service, a name is chosen for the mount.

    This name is the reference for the Volumes parameter in the config file.

    Example:

    In the App Service properties, I mounted an Azure File Share and gave the name MyExternalStorage

    In the docker compose configuration I have to set

    volumes:

    • MyExternalStorage:/var/www/html/contao

    It was just that. If anyone struggles on this one day, I hope it will be the solution for you too.

    Kind regards,
    Teddy

    3 people found this answer helpful.
    0 comments No comments

  2. Anagnostopoulos Tassos 11 Reputation points
    2021-06-15T13:56:33.043+00:00

    Hi, just to make the above description from TeddyDubois29 a bit clearer, the exact steps that should be followed are given in the answer provided by @Ryan Hill in https://learn.microsoft.com/en-us/answers/questions/343312/azure-app-services-w-docker-compose-volume-persist.html.

    The only thing to point out in ryanchill's answer is that the mount path which you specify when creating the Azure Storage Mount is not taken into account. The only mount path that is important to define is the path specified in the "volumes" entry of the Docker Compose file.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.