hasura / hasura/graphql-engine
Hasura with postgres connection
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Hello I was trying to connect Hasura to an already existing database of postgres. I tried all three methods as ENV variables, URL, and connection parameters. note that I have docker of both Hasura and postgres in different

docker-compose: Following are specifications [ { "definition": "name", "message": "connection to the server at "localhost" (127.0.0.1), port 5432 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?\nconnection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address\n\tIs the server running on that host and accepting TCP/IP connections?\n", "name": "source name", "reason": "Inconsistent object: connection error", "type": "source" } ]
Both docker containers are running and even with the same parameters I was able to connect pgadmin 4 Also I tried with different posts such as 172.17.0.4 because I was showing this IP too for IPv4 even tried with localhost.[enter image description here](https://i.stack.imgur.com/LE3lX.png)
I wanted to get connected with Hasura and postgres who both are running as independent containers in docker.
Contributor guide
Research direction
Start with the docker-compose setup and the reported connection-refused error. Check how Hasura resolves the PostgreSQL host when the containers are separate, using the stated ENV, URL, and connection-parameter configurations. Done means Hasura connects successfully to the existing PostgreSQL database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgres
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100