- az | Microsoft Learn (Azure CLI)
- In the current app service → Development Tools → Advanced Tools → “Go →” → (KUDU console opens) → There is a menu on the top bar!
- We can use SSH to go inside the App Service container.
- SSH access for Linux and Windows containers - Azure App Service | Microsoft Learn
We can install new package inside App Service container via
apt install ffmpeg
but after re-deploy, everything installed isn’t persisted. Inside this SSH, it also says that “Any data outside /home is not persisted”! ← one SO.- Using CLI to ssh to App Service container
1az webapp ssh -n MyUniqueAppName -g MyResourceGroup
- Good to read: Enabling SSH on Linux Web App for Containers
- To open SSH from remote shell, read this.
Azure Portal → Subscriptions → (choose a subscription) → Usage + quotas
- Enter App Service container and using SSH ← not persisted
We can install new package inside App Service container via
apt install ffmpeg
but after re-deploy, everything installed isn’t persisted. Inside this SSH, it also says that “Any data outside /home is not persisted”! ← one SO.ACR = Azure Container Registry.
1# list all local images
2docker images -a
3
4# login
5az login
6
7# create an acr
8az acr create --resource-group web-app-simple-rg --name idetafastapiacr --sku Basic
9
10# login to this acr
11az acr login --name idetafastapiacr
12
13# push local "fastapi-demo" image
14docker login
15# username and password in Container registries -> Settings -> Access keys
16docker tag fastapi-demo idetafastapiacr.azurecr.io/samples/fastapi-demo
17docker push idetafastapiacr.azurecr.io/samples/fastapi-demo
Azure sẽ gởi pingpong đến 1 endpoint tạo trên server để check status của nó. Thường app service sẽ chạy trên nhiều instances khác nhau, instance nào die thì cái health check này sẽ hiển thị. Official doc.
Location: Home → App Services → <service name> → Monitoring → Health check
Trong đây có chỗ “Health probe path” để điền endpoint cần vào.
1# List all slots of a given App Service
2az webapp deployment slot list --name <webAppName> --resource-group <resourceGroupName>