If I want to run 100 identical services with Azure ContainerApp, how can I make each service read its own config file?

Alper Kose 0 Reputation points
2025-01-06T14:13:01.1433333+00:00

Hello, this is my first time using Azure.

First of all, I use VS2022 Pro. The program was written in C# .Net8, Worker Service project...

I uploaded the code I wrote to Azure Service Registry, no problem...

Then I ran it as a Container App, no problem..

My question is as follows, I need to run 100 ContainerApps from this same service. However, since the programs in ContRegistry are exactly the same, I cannot make different configurations. For example

ContApp001 should connect to RabbitMq QueueName001 at start time

ContApp002 should connect to RabbitMq QueueName002 at start time... Think of 100 of these apps...

Initially, I need to change a .txt, xml or json file of each service and start it.

I didn't see it in Azure, can you help me???

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 25,241 Reputation points Microsoft Employee Moderator
    2025-01-16T13:18:35.8233333+00:00

    @Alper Kose
    You can use the same image or application with a customized Environment Variable that defines the queue name. You will need to update the image or application to read this Environment Variable instead of using a fixed queue name. Then, for each service, you can simply set or change the queue name Environment Variable as needed when you deploy it. This will eliminate the need for individual administration for each app in the future, so when you update any app, all of them will just use the new image and the same Environment Variable mechanism.

    Refer to Environment variable in Azure container apps : https://learn.microsoft.com/en-us/azure/container-apps/environment-variables?tabs=portal

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.