C
C#2y ago
ghoulam

❔ ✅ Hand the connection string to a container

Hi, I have an asp.net core webapi that I pushed to docker hub and as a logical thing you want put the connection string in there but the question is how to give that info to the container when I launch it?
4 Replies
ghoulam
ghoulamOP2y ago
Maybe in a simpler way : if I keep the "Appsettings.json" file for myself how to ship it to the container when I start it?
Nergy101
Nergy1012y ago
Look up how to use docker environment variables
ghoulam
ghoulamOP2y ago
fixed by adding this to my docker-compose file :
environment:
- CONNECTION_STRING=connection string value
environment:
- CONNECTION_STRING=connection string value
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server