ASPNETCORE_ENVIRONMENT in Docker

前端 未结 5 1197
温柔的废话
温柔的废话 2021-01-17 07:35

i have problems setting the ASPNETCORE_ENVIRONMENT variable running my project in a docker container. The problem is that the value is alwa

5条回答
  •  轮回少年
    2021-01-17 08:11

    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.

提交回复
热议问题