Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this quickstart, you deploy Data API builder (DAB) as a Docker container to Azure Container Apps. You use an Azure Developer CLI (AZD) template to deploy DAB along with an Azure Cosmos DB for NoSQL database using the latest best practices. The template also deploys a sample web application that connects to the DAB endpoint using GraphQL.
Prerequisites
- Azure Developer CLI
- .NET 9.0
- Azure subscription where you have at least the Contributor role
- Docker running locally
If you don't have an Azure account, create a free account before you begin.
Initialize the project
Use the Azure Developer CLI (azd) to create an Azure Cosmos DB for NoSQL account, deploy DAB as a containerized solution, and deploy a containerized sample application. The sample application uses DAB to query sample data.
Open a terminal in an empty directory.
If you're not already authenticated, authenticate to the Azure Developer CLI using
azd auth login. Follow the steps specified by the tool to authenticate to the CLI using your preferred Azure credentials.azd auth loginUse
azd initto initialize the project.azd init --template dab-azure-cosmos-db-nosql-quickstartDuring initialization, configure a unique environment name.
Deploy the full solution to Azure using
azd up. The Bicep templates deploy an Azure Cosmos DB for NoSQL account, DAB to Azure Container Apps, a sample web application, and a managed identity for secure data access.azd upDuring the provisioning process, select your subscription and desired location. Wait for the provisioning process to complete. The process can take several minutes depending on your region and subscription.
Once the provisioning of your Azure resources is done, a URL to the running web application is included in the output.
Deploying services (azd deploy) (✓) Done: Deploying service api - Endpoint: <https://[container-app-sub-domain].azurecontainerapps.io> (✓) Done: Deploying service web - Endpoint: <https://[container-app-sub-domain].azurecontainerapps.io> SUCCESS: Your up workflow to provision and deploy to Azure completed in <duration>.Record the values for the URL of the api and web services. You use these values later in this guide.
Configure the database connection
Now, browse to each containerized application in Azure Container Apps to validate that they're working as expected.
First, navigate to the URL for the api service. This URL links to the running DAB instance.
Observe the JSON output from DAB. It should indicate that the DAB container is running and the status is Healthy.
{ "status": "Healthy", "version": "1.4.35", "app-name": "dab_oss_1.4.35" }- Navigate to the relative
/graphqlpath for the DAB instance.
- If the app is running in Development mode, this URL opens the Nitro GraphQL integrated development environment (IDE).
- If the app is running in Production mode, Nitro isn't shown for browser navigation to
/graphql. In that case, use the sample web app or another GraphQL client.
- If Nitro is available, create a new document and run this query to get all 100 items in the Azure Cosmos DB for NoSQL
productscontainer.
query { products { items { id name description sku price cost } } }- Navigate to the relative
Finally, navigate to the URL for the web service. This URL links to the running sample web application that connects to the GraphQL endpoint you accessed in the previous step.
Observe the running web application and review the output data.

Clean up
When you no longer need the sample application or resources, remove the corresponding deployment and all resources.
Remove the deployment from your Azure subscription.
azd downDelete the running codespace to maximize your storage and core entitlements if you're using GitHub Codespaces.