help deploying asp.net app docker image to render.com
So I am trying to deploy my docker image to render.com, but once I deploy my app i see in the logs the following error:
i already added the clientid and clientsecret environment variables to render.com, but for some reason i still get the above error. it works fine locally but once i deploy i get error 500 whenever i try to load the app. how can i fix this?
10 Replies
keys here need to be
Configuration in ASP.NET Core
Learn how to use the Configuration API to configure AppSettings in an ASP.NET Core app.
also prefer using
dotnet user-secrets
for secrets for development, and keep appsettings.json committed to your repository that wayok thanks
for some reason after i deploy, i can see my app now but when i am on the homepage it redirects me to the error page saying:
Request ID: Name does not resolve
.i think the reason for the name error is the fact that it says
An error occurred using the connection to database 'realtime_poll' on server 'tcp://db:5432'.
though not sure why its failing to connect in prod but works fine locally.
Host=db;Port=5432;Database=realtime_poll;User Id=<id>;Password=<password>;
this is the connection string i am using in dev and prodalso when i try to login now, it says the redirect uri is wrong. but i cant add http uri to google cloud console, it wont let me. so im not sure why its givin gme https instead of http. I cant login anymore, even though my docker runs just fine
i'm not familiar with render, dunno. but that sounds like you dont have the
db
container running in same docker network so it can't resolve the address
or at alloh ok
thanks