0

I am deploying an application to an Azure App Service. This is using a container registry to pull and deploy new container images via a webhook. Typically I would deploy one or more web server instances and one or more worker instances. In the App Service it would appear they would all be available to the load balancer as web servers.

How would one deploy worker instances? I have considered adding a Container App to the resource group and deploying similarly to it as the worker pool.

Also, once the configuration of workers is complete how does one go about running something like database migrations. It would be ideal that these are run on a single instance. In AWS I might add a deployment step to run this on an auto-scaling group of 1 before deploying at large. Do I need to create another image tag and Container App to prevent the webhook from deploying and running migration on every instance?

Current possibility, as an example:

  1. Bitbucket Pipeline builds and pushes image application:primary-worker
  2. Container App deploys and runs specific startup script.
  3. Pipeline waits for completion of migrations. (No idea how.)
  4. Pipeline builds and pushes images application:worker and application:web
  5. Container App deploys the worker tag to all instances and App Service deploys the web tag to all instances.
Marshall Davis
  • 143
  • 1
  • 6

0 Answers0