Skip to content

Run as an Azure Container App

Bryan Soltis edited this page Jul 14, 2023 · 8 revisions

Run as an Azure Container App


## Overview The Azure Naming Tool requires persistent storage for the configuration files when run as a container. The following processes will explain how to create this volume for your Azure App Service Container. All configuration JSON files will be stored in the volume to ensure the configuration is persisted.


NOTE:
For many of the steps, a sample process is provided, however, there are many ways to accomplish each step.

Steps

  1. Scroll up to the top, left corner of this page.
  2. Click on the AzureNamingTool link to open the root of this repository.
  3. Click the green <>Code button and select Download ZIP.
  4. Open your Downloads folder using File Explorer.
  5. Extract the contents of the ZIP archive.


NOTE:
Validate the project files extracted successfully and match the contents in the GitHub repository.

  1. Open a Command Prompt
  2. Change the directory to the AzNamingTool folder. For example:
cd .\Downloads\AzureNamingTool
  1. Run the following Docker command to build the image:
docker build -t azurenamingtool .


NOTE:
Ensure the '.' is included in the command

  1. Create an Azure Container Registry: Microsoft Docs reference
  2. Build and publish your image to the Azure Container Registry: Microsoft Docs reference
  3. Create an Azure Files file share for persistent storage: Microsoft Docs reference

FileShare

  1. Create an Azure Container App: Quickstart: Deploy an existing container image with the Azure CLI


NOTE:
It is possible to deploy a container app via the portal, however, setting the volume for persistent storage is much easier using the CLI.

  1. Configure the Azure Container App to use an Azure Files file share for the volume: Use storage mounts in Azure Container Apps
  2. Access the site using your Azure App Service URL.


NOTE:
It is recommended that you enable authentication on your Container App to prevent unauthorized access. Authentication and authorization in Azure Container Apps