Skip to content

Commit 5e9a3e5

Browse files
authored
Merge pull request #53150 from MicrosoftDocs/NEW-deploy-containers-azure-app-service
New deploy containers azure app service module
2 parents efbd734 + 8e6a5b2 commit 5e9a3e5

17 files changed

Lines changed: 983 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: Introduction
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 3
12+
content: |
13+
[!include[](includes/1-introduction.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.deploy-containers
3+
title: Deploy containers to Azure App Service
4+
metadata:
5+
title: Deploy Containers to Azure App Service
6+
description: Deploy containers to Azure App Service
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/2-deploy-containers.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.configure-runtime
3+
title: Configure container runtime behavior
4+
metadata:
5+
title: Configure Container Runtime Behavior
6+
description: Configure container runtime behavior
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/3-configure-runtime.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.configure-settings
3+
title: Configure application settings
4+
metadata:
5+
title: Configure Application Settings
6+
description: Configure application settings
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/4-configure-settings.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.observe-troubleshoot
3+
title: Observe and troubleshoot containerized apps
4+
metadata:
5+
title: Observe and Troubleshoot Containerized Apps
6+
description: Observe and troubleshoot containerized apps
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 10
12+
content: |
13+
[!include[](includes/5-observe-troubleshoot.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.exercise
3+
title: Exercise - Deploy a container to Azure App Service
4+
metadata:
5+
title: Exercise - Deploy a container to Azure App Service
6+
description: Exercise - Deploy a container to Azure App Service
7+
ms.date: 01/12/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 30
12+
content: |
13+
[!include[](includes/6-exercise.md)]
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.module-assessment
3+
title: Module assessment
4+
metadata:
5+
title: Module Assessment
6+
description: Module assessment
7+
ms.date: 01/13/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
azureSandbox: false
12+
durationInMinutes: 5
13+
content: |
14+
quiz:
15+
questions:
16+
- content: "A container image is configured to listen on port 8000. After deploying to App Service, requests to the application return connection errors. What configuration change resolves this issue?"
17+
choices:
18+
- content: "Set the `WEBSITES_PORT` app setting to 8000."
19+
isCorrect: true
20+
explanation: "Correct. For custom containers, App Service can automatically route traffic when the container listens on port 80 or 8080. If the container listens on a different port, WEBSITES_PORT tells App Service which port to forward HTTP requests to inside the container."
21+
- content: "Modify the Dockerfile to use EXPOSE 80."
22+
isCorrect: false
23+
explanation: "Incorrect. EXPOSE doesn't change which port the application listens on. Your application still listens on the port it binds to at runtime, and App Service still needs to know which port to forward traffic to."
24+
- content: "Enable the HTTP/2 protocol in the platform settings."
25+
isCorrect: false
26+
explanation: "Incorrect. HTTP/2 affects the protocol used for client connections, not the port routing between App Service and the container."
27+
- content: "A document processing application writes output files during processing. After a container restart, the output files are missing. How do you configure App Service to persist these files?"
28+
choices:
29+
- content: "Set `WEBSITES_ENABLE_APP_SERVICE_STORAGE` to true and write files to the `/home` directory."
30+
isCorrect: true
31+
explanation: "Correct. This setting enables persistent storage for the /home directory. Files written to /home persist across container restarts and are shared across scaled instances."
32+
- content: "Configure a larger container image with more disk space."
33+
isCorrect: false
34+
explanation: "Incorrect. Container image size doesn't affect persistence. The container file system is ephemeral by default regardless of available space."
35+
- content: "Enable always-on to prevent container restarts."
36+
isCorrect: false
37+
explanation: "Incorrect. Always-on prevents the app from unloading due to inactivity, but containers still restart for deployments, scaling, and platform maintenance. Persistent storage is the correct solution."
38+
- content: "A production application requires different API endpoint URLs for staging and production deployment slots. Which configuration approach ensures the staging URL doesn't swap to production during a slot swap?"
39+
choices:
40+
- content: "Configure the API_ENDPOINT setting as a slot setting."
41+
isCorrect: true
42+
explanation: "Correct. Slot settings remain with their slot during swap operations. Marking API_ENDPOINT as a slot setting ensures each slot maintains its own endpoint configuration."
43+
- content: "Store the API endpoint in the container image for each environment."
44+
isCorrect: false
45+
explanation: "Incorrect. Hardcoding values in container images requires rebuilding for each environment and loses the benefits of environment-independent deployments."
46+
- content: "Use connection strings instead of app settings for the API endpoint."
47+
isCorrect: false
48+
explanation: "Incorrect. Connection strings swap between slots unless also marked as slot settings. Connection strings are intended for database connections, not API endpoints."
49+
- content: "A container starts successfully but health checks are failing, and App Service removes instances from the load balancer. The application has a `/healthz` endpoint that returns HTTP 200. What is the most likely cause?"
50+
choices:
51+
- content: "The health check path in App Service is configured differently than the application's health endpoint path."
52+
isCorrect: true
53+
explanation: "Correct. The health check path configured in App Service must match the exact path where your application responds to health requests. A mismatch like /health versus /healthz causes check failures."
54+
- content: "Health checks require HTTPS, but the container only serves HTTP."
55+
isCorrect: false
56+
explanation: "Incorrect. App Service sends health check requests over HTTP to the container. TLS termination happens at the load balancer, so the container receives HTTP requests."
57+
- content: "The container needs more memory to handle health check requests."
58+
isCorrect: false
59+
explanation: "Incorrect. Health check endpoints are typically lightweight. If the endpoint returns 200 successfully when tested directly, the issue is configuration rather than resources."
60+
- content: "A developer needs to verify that app settings are correctly injected into a running container. Which diagnostic tool provides this information?"
61+
choices:
62+
- content: "The Kudu diagnostic console Environment page."
63+
isCorrect: true
64+
explanation: "Correct. The SCM (Kudu) Environment view (or the /Env endpoint) shows the environment variables that App Service applies to the app, including app settings and system-provided variables."
65+
- content: "The log stream in the Azure portal."
66+
isCorrect: false
67+
explanation: "Incorrect. The log stream shows application output, not environment configuration. Environment variables don't appear in logs unless the application explicitly logs them."
68+
- content: "The App Service metrics dashboard."
69+
isCorrect: false
70+
explanation: "Incorrect. Metrics show performance data like CPU, memory, and request counts. Metrics don't include configuration or environment variable information."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.deploy-containers-azure-app-service.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: Summary
7+
ms.date: 01/13/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/8-summary.md)]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Containerized applications provide consistent deployment across environments, but running containers in production requires infrastructure management, scaling configuration, and operational tooling. Azure App Service offers a fully managed platform for running custom containers without managing the underlying infrastructure. Developers bring their own container images and benefit from built-in scaling, deployment slots, and integrated diagnostics.
2+
3+
## Scenario: Deploy a document processing service
4+
5+
Imagine you're a developer on a team building a document processing service. The service accepts uploaded documents, extracts text and metadata, and returns structured results to calling applications. Your team packages the service as a Docker container to ensure consistent behavior across development, testing, and production environments.
6+
7+
The service needs different configuration values for each environment. Development uses local storage endpoints and verbose logging. Production connects to Azure Storage accounts and requires API keys for downstream services. Your team wants to avoid rebuilding the container image for each environment.
8+
9+
Operations requires visibility into the service's behavior. When documents fail to process, the team needs to identify whether the issue is a container startup failure, a misconfigured environment variable, or an application error. The current local Docker setup provides limited diagnostic information compared to what production monitoring requires.
10+
11+
Your client expects the service to handle variable load throughout the day. Document uploads spike during business hours and drop overnight. The team needs the platform to scale without manual intervention. Cold start times matter because users notice delays when the app becomes idle and needs to start again, or when new instances start during scale-out.
12+
13+
Azure App Service addresses these requirements by providing a managed container hosting platform with environment-specific configuration, integrated logging, and automatic scaling. This module guides you through deploying and configuring containerized applications on App Service.
14+
15+
## Learning objectives
16+
17+
After completing this module, you'll be able to:
18+
19+
- Deploy custom containers to Azure App Service from container registries.
20+
- Configure container runtime behavior including startup commands, port settings, and persistent storage.
21+
- Configure application settings and connection strings in App Service.
22+
- Observe and troubleshoot containerized applications using App Service diagnostic tools.

0 commit comments

Comments
 (0)