This demonstration presents a simple product catalog service that's deployable to an Azure Container App resource. The build artifact is hosted in GitHub Packages.
This demo uses the following technologies:
- Docker & Docker Compose
- SQL Server on Linux
- .NET Core 6.0
- Azure Functions (Isolated worker)
- Azure Functions HTTP triggers
- Entity Framewok Core (with Migrations and Compiled Models)
- Terraform
After installing the prerequirements, follow these instructions:
- Checkout the source
- Open the folder in VS Code
- Install the recommended extensions
- Copy the connection string from docker-compose.yml, replacing server name with
localhost - Open a shell prompt, and
- Set the SQL_CONNECTION_STRING environment variable's value to the connection string from step #4
- Issue
docker compose --project-directory "src" up -d
- You can now reach the API at
http://localhost:32741/api/productsendpoint.- Copy the function key from
host_secrets.jsonand supply the value either viacodequery parameter or viax-functions-keyheader
- Copy the function key from
- Issue
docker compose --project-directory "src" stopto stop the containers
After installing the prerequirements, follow these instructions:
- Get yourself an Azure Subscription to which you want to deploy resources
- Go to Azure Portal, and copy the subscription ID to clipboard
- Install the necessary Terraform CLI and Az CLI tools to your computer
- Go to the
deploy/azurefolder, and runterraform init - Run
terraform applyand paste the subscription ID when prompted - Type in
yesto begin deploying the resources - Remember to use
terraform destroyafterwards to remove the resources