Question
PostgreSQL connection string error on Payload cms
Payload Version "payload": "^2.0.0"
Node Version node:18.8-alpine
Next.js Version "next": "13.5.2"
Bug
When I run yarn build
I got this error:
[12:41:39] ERROR (payload): Error: cannot connect to Postgres. Details: getaddrinfo ENOTFOUND postgres
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This is my database uri:
DATABASE_URI="postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}"
2 37
2