This repository was created to help users quickly deploy Dapr-enabled microservices to Azure Container Apps.
The solution is composed of two microservices: the album API and the album viewer.
The album-api
is an .NET 6 minimal Web API that retrieves a list of Albums from Azure Storage using the Dapr State Store API. Upon running the application for the first time the database will be seeded. For subsequent calls, the list of albums will be retrieved from the backing state store.
The album-viewer
is a node application through which the albums retrieved by the API are surfaced. In order to display the repository of albums, the album viewer microservice uses the Dapr Service invocation API to contact the backend album API.
The entire solution is configured with GitHub Actions and Bicep for CI/CD
-
Fork the sample repo
-
Create the following required encrypted secrets for the sample
Name Value AZURE_CREDENTIALS The JSON credentials for an Azure subscription. Replace the placeholder values and run the following command to generate the Azure authentication information for this GitHub secret az ad sp create-for-rbac --name INSERT_SP_NAME --role contributor --scopes /subscriptions/INSERT_SUBSCRIPTION_ID --sdk-auth
. For guidance on adding a secret, see hereRESOURCE_GROUP The name of the resource group to create GH_PAT Generate a GitHub personal access token with write:packages
permission and store as a pipeline secret. This PAT will be used to push images to your private GitHub Package Registry. -
Open the Actions tab, select the Build and Deploy action and choose to run the workflow. The workflow will build the necessary container images, push them to your private Github Package Registry and deploy the necessary Azure services along with two Container Apps for the respective services.
-
Once the GitHub Actions have completed successfully, navigate to the Azure Portal and select the resource group you created. Open the
album-viewer
container app and browse to the FQDN displayed on the overview blade. You should see the sample application up and running.
Click here for instructions on building and running the application locally