Due to a limitation of the Azure Developer CLI (azd), there can be only one host option in the azure.yaml file.
By default, host: containerapp is used and host: appservice is commented out.
However, if you have an older version of the repo, you may need to follow these steps to deploy to Container Apps instead, or you can stick with Azure App Service.
To deploy to Azure Container Apps, please follow the following steps:
-
Comment out
host: appserviceand uncommenthost: containerappin the azure.yaml file. -
Login to your Azure account:
azd auth login
-
Create a new
azdenvironment to store the deployment parameters:azd env new
Enter a name that will be used for the resource group. This will create a new folder in the
.azurefolder, and set it as the active environment for any calls toazdgoing forward. -
Set the deployment target to
containerapps:azd env set DEPLOYMENT_TARGET containerapps -
(Optional) This is the point where you can customize the deployment by setting other `azd1 environment variables, in order to use existing resources, enable optional features (such as auth or vision), or deploy to free tiers.
-
Provision the resources and deploy the code:
azd up
This will provision Azure resources and deploy this sample to those resources, including building the search index based on the files found in the
./datafolder.Important: Beware that the resources created by this command will incur immediate costs, primarily from the AI Search resource. These resources may accrue costs even if you interrupt the command before it is fully executed. You can run
azd downor delete the resources manually to avoid unnecessary spending.
The default workload profile is Consumption. If you want to use a dedicated workload profile like D4, please run:
azd env AZURE_CONTAINER_APPS_WORKLOAD_PROFILE D4For a full list of workload profiles, please check the workload profile documentation. Please note dedicated workload profiles have a different billing model than Consumption plan. Please check the billing documentation for details.
Private endpoints is still in private preview for Azure Container Apps and not supported for now.