1

I have a PHP/Laravel app in an Azure DevOps repository that is published as a Docker image. The docker image is built using Azure DevOps pipelines and then ultimately published to a private registry on Digital Ocean. Each published image gets its own unique label which is the build number from DevOps pipeline. So far so good. The docker image is then deployed as a Digital Ocean App with its own environment variables, dns etc. This works well, except that I'm not sure what is the best way to update the Digital Ocean App when the image is updated. I was thinking of using a latest tag which would allow Digital Ocean to automatically deploy the new image when its available. However, the documentation warns against doing this:

When updating the source image tag, a new deployment will be triggered. If the actual tag name has not changed, it is not guaranteed to pull down a fresh copy of the image due to caching. The recommended approach is to use unique tag names for all image updates.

The alternative was to use doctl as part of DevOps pipeline and run a doctl app <appid> update supplying the yaml manifest file as an argument. However, this approach overwrites all the environment variables and all other settings. So unless I write all the configuration and secrets in the manifest file, this won't work.

So, what would be the best way to update my app with a new image in this scenario?

MojoJojo
  • 3,897
  • 4
  • 28
  • 54

0 Answers0