Skip to content

Instantly share code, notes, and snippets.

@ilmax
Last active July 28, 2022 10:11
Show Gist options
  • Save ilmax/81c40963ca2467b0bbda624493cda1da to your computer and use it in GitHub Desktop.
Save ilmax/81c40963ca2467b0bbda624493cda1da to your computer and use it in GitHub Desktop.
Deployment script
#!/bin/bash
rg=<your resource group name here>
app=<your container app name here>
baseimage=<your acr name here>.azurecr.io/<your repository name here>
tag=<your image tag here>
host=<your deployment app host here>
url=http://$host/resource-groups/$rg/apps/$app/deploy
echo "Starting deployment at: $url"
curl --get --data-urlencode imageName=$baseimage:$tag $url
#!/bin/bash
registry=myregistry
rg=container-app-test
app=producer-containerapp-internal
baseimage=$registry.azurecr.io/producer
tag=${DOCKER_TAG:-$(date +%s%3N)}
host=localhost:5080
echo "Tag is: $tag"
url=http://$host/resource-groups/$rg/apps/$app/deploy
az acr login -n $registry
# Retag and push the image to the registry to simulate a deployment
docker tag baseapp:latest $baseimage:$tag
docker tag baseapp:latest $baseimage:latest
docker push $baseimage:$tag
docker push $baseimage:latest
echo "Starting deployment at: $url"
curl --get --data-urlencode imageName=$baseimage:$tag $url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment