Last active
July 28, 2022 10:11
-
-
Save ilmax/81c40963ca2467b0bbda624493cda1da to your computer and use it in GitHub Desktop.
Deployment script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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