Deploying as a docker image on Azure

  • Hi,

    I'm trying to deploy my application as a docker image on Azure. The basic setup is working, but now I either want to use Azure Storage for storing my resources files (images) or use the default app service storage. This issue is that with using Azure Storage, I can see the new images in my File Share, but it seems that Perch can't read them since I'm getting "502 - Web server received an invalid response while acting as a gateway or proxy server.".

    Using the default app service storage, I need to store my images in the home folder of the container, but I'm having some issues setting the resource folder to something like "/home/perchuser/resources", while running the rest of the app under /var/www/html.

    Anyone who has successfully set up their Perch app in Azure with storing their images outside of the container?

  • George G

    Approved the thread.
  • I don't think Azure Storage will work with Perch. It may work with Runway, but will probably need a storage driver written for it. Runway comes with storage drivers for AWS S3, Dropbox and OpenStack.

    With containers, there is a way to get round the "home" folder issue by packaging your container into a Docker Compose multi-container.

    The link here explains more…gure-multi-container-apps

    Otherwise, utilising Azure Kubernetes will allow you even more flexibility with your config/setup.

  • Thanks, I tried that, by setting WEBSITES_ENABLE_APP_SERVICE_STORAGE to true and then deploying it as a docker compose with the volume:


    - "${WEBAPP_STORAGE_HOME}/site/wwwroot:/var/www/html/perch/resources"

    But still getting, but I guess this is more a Azure issue than a Perch issue.

    "502 - Web server received an invalid response while acting as a gateway or proxy server.

    There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server."