The application is written in Python with the help of Flask together with Gunicorn. It simply does nothing but showing a hello-world-like welcome message.
A new version of docker image is being prepared on each commit to any development and master branch.
- for master branch, the image matches:
<container_registry_login_server>/showoff:${{ github.sha }}
- for dev branches the image matches:
<container_registry_login_server>/showoff:${{ github.run_id }}
To recreate the infrastructure stack, one should initialize the Container Registry and push the image before proceeding with the remaining resources.
cd terraform
terraform init
terraform plan -target azurerm_container_registry.acr -out basic-plan.out
terraform apply basic-plan.out
az acr build --registry terraformshowoff -g terraform-showoff --image showoff:v1.0.0 ../
terraform plan -var app_tag="v1.0.0" -out plan.out
terraform apply plan.out
The whole process will take approximately 15-20 minutes due to the long Gateway Application's initialization.