ENV file to feed the environment variables into the container app.

Mansi Gusain 495 Reputation points
2024-09-25T04:23:03.6166667+00:00

Hi I wish to upload my env file - in the container app environment as a file share (for instance) then I want that the related container app reads the env variables from that file is this possible , if yes then using what. Thanks in advance.

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

1 answer

Sort by: Most helpful
  1. Lex Li 6,037 Reputation points Microsoft Employee
    2024-09-25T07:39:35.34+00:00

    There doesn’t appear to be native support for this functionality. However, depending on the specific deployment method being used, there are alternative approaches available to achieve the same outcome.

    For instance, if GitHub Actions is being used for continuous deployment to Azure Container Apps, the deployment task provides the ability to define environment variables. This can be achieved by referencing the following GitHub repository:

    https://github.com/Azure/container-apps-deploy-action

    Consequently, the data contained within the environment variables can be extracted from the ENV file and passed to the environmentVariables setting of deployment task within the continuous deployment workflow.

    If a different deployment method is being used, a similar methodology can be implemented to achieve the desired result.


Your answer

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