C
C#10mo ago
Ares

trying to deploy my app with docker with my problems

So i have my container running, and when I go to localhost:8080 where the docker is running, it takes me to the error view with the message being:
Error.
An error occurred while processing your request.
Request ID: An exception has been raised that is likely due to a transient failure.

Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
Error.
An error occurred while processing your request.
Request ID: An exception has been raised that is likely due to a transient failure.

Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
6 Replies
Ares
AresOP10mo ago
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
2024-02-23 04:00:03 server-1 | Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2024-02-23 04:00:03 server-1 | No XML encryptor configured. Key {69f17d4e-5434-4889-8dfa-7aaddb920824} may be persisted to storage in unencrypted form.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[14]
2024-02-23 04:00:03 server-1 | Now listening on: http://[::]:8080
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Application started. Press Ctrl+C to shut down.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Hosting environment: Production
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Content root path: /app
2024-02-23 04:00:56 server-1 | warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2024-02-23 04:00:56 server-1 | Failed to determine the https port for redirect.
2024-02-23 04:00:56 server-1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
2024-02-23 04:00:56 server-1 | An error occurred using the connection to database 'realtime_poll' on server 'tcp://localhost:5432'.
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
2024-02-23 04:00:03 server-1 | Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2024-02-23 04:00:03 server-1 | No XML encryptor configured. Key {69f17d4e-5434-4889-8dfa-7aaddb920824} may be persisted to storage in unencrypted form.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[14]
2024-02-23 04:00:03 server-1 | Now listening on: http://[::]:8080
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Application started. Press Ctrl+C to shut down.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Hosting environment: Production
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Content root path: /app
2024-02-23 04:00:56 server-1 | warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2024-02-23 04:00:56 server-1 | Failed to determine the https port for redirect.
2024-02-23 04:00:56 server-1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
2024-02-23 04:00:56 server-1 | An error occurred using the connection to database 'realtime_poll' on server 'tcp://localhost:5432'.
i think the problem is that i cant connect to the db.
mindhardt
mindhardt10mo ago
Yes, because localhost inside docker is not the host machine It is a container host Is your db also in docker?
Ares
AresOP10mo ago
no. i need to do that. the first thing i did was do docker build -t realtime_polls . and then that made the image. and then to run it I did docker run -it --rm -p 5000:80 -e ASPNETCORE_URLS=http://+:80 --name realtimepolls realtimepolls so now the caontainer is running the image i made. but now for the database, I was trying to follow this guide to add the postgres db, but whenever I try to create a new database, i dont see it in the list when i do \l https://www.commandprompt.com/education/how-to-create-a-postgresql-database-in-docker/
How to Create a PostgreSQL Database in Docker
To create a PostgreSQL database in Docker, use the “CREATE DATABASE <database-name>;” command. Then, create a new table in it and insert values in the ta…
Ares
AresOP10mo ago
No description
No description
Ares
AresOP10mo ago
No description
Ares
AresOP10mo ago
nvm resolved
Want results from more Discord servers?
Add your server