ERROR: getaddrinfo ENOTFOUND postgres postgres:5432 on migrations in docker-compose
See original GitHub issueWhat are you doing?
I am running a microservice with sequelize and postgres it seems to properly connect to the database when running node app but on migrations it throws this error
Sequelize CLI [Node: 8.16.0, CLI: 5.4.0, ORM: 5.7.4]
Loaded configuration file "lib/sequelize/config.js".
ERROR: getaddrinfo ENOTFOUND postgres postgres:5432
// code here
Environment
Dialect:
- mysql
- postgres
- sqlite
- mssql
- any Dialect library version: Don’t Know Database version: Don’t Know Sequelize version: 5.4.0 CLI Node Version: 8.16.0 OS: docker If TypeScript related: TypeScript version: XXX Tested with latest release:
- No
- Yes, specify that version:
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Postgres ENOTFOUND error when connecting docker ...
One solution I found was to artificially delay Docker's connection attempt (basically wait until Postgres is ready before attempting to connect) ...
Read more >ConnectionError: getaddrinfo ENOTFOUND postgres - Support
What is the problem? Be very detailed. I'm trying to use a local database and Nginx . I'm removing these services in my...
Read more >Error getaddrinfo ENOTFOUND db when running sequelize ...
Edit. Okay, I just have to separate the port and host into individual fields: "development": { "username": "postgres", "password": "postgres", ...
Read more >Having problems with connecting my node container ... - Reddit
The problem is the RUN yarn setup is supposed to run database migrations and seeds but I either get "ERROR: getaddrinfo ENOTFOUND postgres...
Read more >Docker Compose networks - General Discussions
Hello I have a problem in my nodejs project with graphql and typescript ... SERVER_PORT=4000 DB_HOST=ci-postgres DB_PORT=5432 DB_USER=spirit ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in your config.json use hopefully it will solve the problem
"development": { ... "host": "host.docker.internal" .... }
Please were you able to solve this? My connection is established but when I run migration it tells the address is not found