-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploying Web Apps with Sidecar Containers #430
Comments
Hi @jscarle - right now, we don't have a way to deploy sidecars with Github Actions. However, we are working on this and you should have the functionality in a few months. In the meanwhile, you can deploy your app using an ARM template. Here is an example https://github.com/Azure-Samples/appservice-linux-sidecar/blob/main/nginx-sample/armtemplatemultictr.json |
For anyone else who comes across this issue and is looking for the same answer as I was, this is how you can update your existing Web App using a GitHub Action.
permissions:
contents: read
id-token: write
jobs:
update-deployment:
name: Update Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Login to Azure
uses: azure/login@v2
with:
creds: {credentials}
- name: Deploy Azure Resource Manager template
uses: azure/arm-deploy@v2
with:
deploymentName: {deployment}
deploymentMode: Incremental
scope: resourcegroup
resourceGroupName: {resourcegroup}
template: ./update-deployment.json
parameters: webAppName={webAppName} mainImage={mainImage} sidecarA={sidecarA} Replace the following placeholders with your values: This is the ARM template:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string",
"metadata": {
"description": "The name of the Web App"
}
},
"mainImage": {
"type": "string",
"metadata": {
"description": "The main image to set"
}
},
"sidecarAImage": {
"type": "string",
"metadata": {
"description": "The first sidecar image to set"
},
"defaultValue": ""
},
"sidecarBImage": {
"type": "string",
"metadata": {
"description": "The second sidecar image to set"
},
"defaultValue": ""
},
"sidecarCImage": {
"type": "string",
"metadata": {
"description": "The third sidecar image to set"
},
"defaultValue": ""
},
"sidecarDImage": {
"type": "string",
"metadata": {
"description": "The fourth sidecar image to set"
},
"defaultValue": ""
}
},
"resources": [
{
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'main')]",
"properties": {
"image": "[parameters('mainImage')]",
"isMain": true
}
},
{
"condition": "[not(empty(parameters('sidecarAImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarA')]",
"properties": {
"image": "[parameters('sidecarAImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarBImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarB')]",
"properties": {
"image": "[parameters('sidecarBImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarCImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarC')]",
"properties": {
"image": "[parameters('sidecarCImage')]",
"isMain": false
}
},
{
"condition": "[not(empty(parameters('sidecarDImage')))]",
"type": "Microsoft.Web/sites/sitecontainers",
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('webAppName'), 'sidecarD')]",
"properties": {
"image": "[parameters('sidecarDImage')]",
"isMain": false
}
}
]
} |
I've looked over all of the documentation available for sidecars:
https://learn.microsoft.com/en-us/azure/app-service/tutorial-custom-container-sidecar
I cannot find any way to deploy a new image for Web Apps that are sidecar enabled. The closest I could find was this:
But that's not valid for sidecar enabled Web Apps.
The text was updated successfully, but these errors were encountered: