This document describes how to deploy the Chatr application to Azure using Bicep and the Azure CLI. The Chatr application is a full-stack web application that consists of a frontend built with React and a backend API built with Azure Functions. The deployment process involves creating the necessary Azure resources, deploying the API to Azure Functions, and deploying the frontend to Azure Static Web Apps.
main.bicep
and uses modules for the various child resources.deploy.sh
this does various checks and configuration handling.az deployment sub create
as a subscription level template, that way the resource group can also be defined in the template.A number of Azure resources are created as part of the deployment:
Roles are assigned from the Azure Function Appβs system managed identity as follows:
Web PubSub Service Owner
Storage Blob Data Contributor
Storage Table Data Contributor
Monitoring Metrics Publisher
From the root of the project run
make deploy
AZURE_RESGRP={Name of Azure resource group, will be created} \
AZURE_REGION={Azure region to deploy to} \
AZURE_PREFIX={Resource name prefix, e.g. mychatr}
You can also run:
make deploy-infra
- Deploy just the Azure resourcesmake deploy-api
- Deploy the API to the Function App (needs deploy-infra to have run)make deploy-client
- Deploy the frontend app to Static Web App (needs deploy-infra to have run)Note when picking a value for AZURE_PREFIX, use something other than βchatrβ as that will result in resource name clash!