4.50.2 Does not use Environment Variables anymore

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 年間の 前
My current environment is a VM (Windows). I will be deploying using Azure Container Apps, which runs with Kubernetes under the hood. I will need to dockerize the project so I am thinking of passing the environment variables from docker to the app.
1 年間の 前
jjcowo wrote:
My current environment is a VM (Windows). I will be deploying using Azure Container Apps, which runs with Kubernetes under the hood. I will need to dockerize the project so I am thinking of passing the environment variables from docker to the app.


Ok. Just as a heads up Container Apps is not designed for an eCommerce type web application. It's meant for applications with smaller footprints, short running items and not stateful (http rest API calls, background tasks etc). nopCommerce is not designed for that type of environment as it is a stateful web application. Honestly it is not that different from deciding to use Azure Functions. A little more featureful but same types of use cases.

If you want to use Docker in production, you'll need to keep the Windows VM or run Docker on a Linux VM. If you want to use kubernetes you should either use AKS or use something like Rancher on top of a Linux VM scale set (use Terraform to deploy and manage your infrastructure).

If you expect kubernetes under the hood you don't "pass env variables from Docker" as in that scenario Docker is only used to build and tag your image. Docker would not be running the production workload...kubernetes would. Therefore, you would need set your environment variables in your kubernetes deployment yaml or Helm chart.

I think you need to do some more research and designing before you decide on a production hosting path.
1 年間の 前
Thank you for your input.
One last question, I've been trying to setup the Environment Variables via the cli
set ConnectionStrings: ,
export ConnectionStrings: ,
and export System__ConnectionStrings__DefaultConnection:
have not worked for me. Could you clarify how I can setup environment variables with development?
I don't want to have the connection strings on the appsettings.json file, even for development.
1 年間の 前
jjcowo wrote:
Thank you for your input.
One last question, I've been trying to setup the Environment Variables via the cli
set ConnectionStrings: ,
export ConnectionStrings: ,
and export System__ConnectionStrings__DefaultConnection:
have not worked for me. Could you clarify how I can setup environment variables with development?
I don't want to have the connection strings on the appsettings.json file, even for development.





Then you do things like this:
ConnectionStrings__ConnectionString="conn string", AzureBlobConfig__ConnectionString="azure conn string"
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.