You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for deployment slot support in Azure App Service (#290)
* Initial plan
* Add documentation for deployment slot support to Azure App Service
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/frontend/src/content/docs/integrations/cloud/azure/azure-app-service.mdx
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,67 @@ The preceding code:
129
129
- Adds an application setting for `ASPNETCORE_ENVIRONMENT`.
130
130
- Adds multiple tags for metadata and organization.
131
131
132
+
## Deployment slots
133
+
134
+
[Deployment slots](https://learn.microsoft.com/azure/app-service/deploy-staging-slots) let you deploy your app to a staging environment for testing before swapping it into production. The `WithDeploymentSlot` extension method configures a deployment slot for the App Service environment:
The preceding code configures all App Service websites to be deployed to a `staging` slot.
156
+
157
+
### Deployment slot behavior
158
+
159
+
When you deploy to a slot, the deployment behavior depends on whether the production App Service already exists:
160
+
161
+
-**New App Service**: If the production App Service (production slot) doesn't exist at the time of deployment, Aspire deploys to both the production App Service and the specified deployment slot.
162
+
-**Existing App Service**: If the production App Service already exists, Aspire deploys only to the specified deployment slot.
163
+
164
+
This behavior allows you to safely deploy and test changes in a staging environment before swapping to production.
165
+
166
+
### Using parameters for deployment slots
167
+
168
+
You can also specify the deployment slot value as a parameter, allowing the slot name to be provided at deployment time:
With this configuration, you can specify the slot name when running `aspire deploy` by providing a value for the `deploymentSlot` parameter.
184
+
185
+
### Applying customizations to slots
186
+
187
+
<Asidetype="caution">
188
+
Customizations applied to the production App Service are not automatically applied to deployment slots. You must explicitly apply any customizations to the slot as well.
189
+
</Aside>
190
+
191
+
When you customize App Service resources using `PublishAsAzureAppServiceWebsite` or `ConfigureInfrastructure`, those customizations apply to the production slot by default. If you need the same customizations on your deployment slot, you must apply them separately. This gives you fine-grained control over the configuration of each slot, allowing staging and production environments to have different settings when needed.
192
+
132
193
## Provisioning-generated Bicep
133
194
134
195
If you're new to [Bicep](https://learn.microsoft.com/azure/azure-resource-manager/bicep/overview), it's a domain-specific language for defining Azure resources. With Aspire, you don't need to write Bicep by-hand, instead the provisioning APIs generate Bicep for you. When you publish your app, the generated Bicep is output alongside the manifest file.
0 commit comments