<@U04UQ68083H> i am facing this issue while runnin...
# ory-copilot
l
@chilly-king-10285 i am facing this issue while running migrations on docker: sg=Unable to ping database, retrying. audience=application error=map[message:failed to connect to `host=localhost user=postgres database=krato
c
A message from kapa.ai
The error message you're seeing suggests that your application is unable to connect to the database. This could be due to a variety of reasons such as incorrect database credentials, network issues, or the database server not running. Unfortunately, the knowledge sources provided do not contain specific information on how to resolve this particular issue. However, they do provide some general guidance on running Ory services in Docker and troubleshooting common issues. Here are a few things you could check: 1. Ensure that your database server is running and accessible from the Docker container. You can check this by trying to connect to the database from the Docker host or another container. 2. Verify that the database credentials (username, password, database name) you're using are correct. These are typically set as environment variables in the Docker run command. For example, in the case of Ory Hydra, the database connection string is set with the
-e DSN=$DSN
option ([source](https://www.ory.sh/docs/hydra/self-hosted/configure-deploy#deploy-ory-hydra)). 3. Check the network settings of your Docker container. If you're using Docker networking (as in the Ory Hydra example), make sure that the container is connected to the correct network with the
--network
option. If you're still having trouble, you might find it helpful to look at the Ory documentation or seek help from the Ory community.