I have a very interesting issue which might be interesting to other developers who love AdonisJS.
I run AdonisJS and PG in docker in two containers:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2c30b1f66607 syndicate_app "npm start" 9 minutes ago Up 4 minutes 0.0.0.0:3333->3333/tcp, 0.0.0.0:9229->9229/tcp syndicate_js 8f0224c55320 postgres:11.3-alpine "docker-entrypoint.s…" 9 minutes ago Up 4 minutes 0.0.0.0:54320->5432/tcp syndicate_db
From local console when I can connect to PG database without any errors:
$ adonis migration:run Nothing to migrate
When I open website in the browser I have an error:
connect ECONNREFUSED 0.0.0.0:54320
I think the problem is that the current host of AdonisJS container is the same as PG - 0.0.0.0.
Who can help to solve this issue?