how to mount a volume in azure container app using the azure portal

Staiger Claes-Philip (Consultant) 0 Reputation points
2024-05-08T05:43:59.02+00:00
  • I have a shared volume in my container-environment but can´t fint the way to mount this volume for the container in the portal. How can I do this using the portal?
  • Furthermore, if a make changes in the container, when restarting container all settings are overwritten (flows / settings.js)? Is there a way to persist app on restart without fileshares?
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
291 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 5,450 Reputation points
    2024-05-08T06:03:56.2933333+00:00

    Hi Staiger, Welcome to MS Q&A

    Answer to 1st Question -->

    1. Go to your container app in the Azure portal.
    2. Open the Revision management page.
    3. Select Create new revision.
    4. In the Create and deploy new revision page.
    5. Select a container and select Edit.
    6. In the Volume mounts section, expand the Secrets section.
    7. Select Create new volume.
    8. Enter the following information:
      • Name: mysecrets
      • Mount all secrets: enabled
      Note If you want to load specific secrets, disable Mount all secrets and select the secrets you want to load.
    9. Select Add.
    10. Under Volume name, select mysecrets.
    11. Under Mount path, enter /mnt/secrets.
    12. Select Save.
    13. Select Create to create the new revision with the volume mount.

    User's image

    Please check this for details

    https://learn.microsoft.com/en-us/azure/container-apps/manage-secrets?tabs=azure-portal#secrets-volume-mounts

    Answer to 2nd question-->

    Using Environment Variables: One common approach is to configure your application to read settings from environment variables. This way, you can inject configuration values into your container at runtime, and they persist across container restarts. In Azure Container Apps, you can set environment variables in the container settings through the Azure portal or Azure CLI.

    Please check below image

    User's image

    Please accept answer if it helps, Thanks!