i have problems setting the ASPNETCORE_ENVIRONMENT variable running my project in a docker container. The problem is that the value is alwa
I had the same problem, I use Rider, I had the environment variable only on the docker-compose file in the service environment section.
What was happening on my end was I did not have ConnectionStrings set in my appsettings.Development.json
so it defaulted to the appsettings.json
file's ConnectionStrings.
I after adding the proper connection string to the development json file everything worked fine with the docker-compose up command. Hope this helps someone as well.