agency-os
agency-os copied to clipboard
Some errors during in-docker database initial setup
On the first docker compose up I see the following:
database-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
database-1 | creating subdirectories ... ok
database-1 | selecting dynamic shared memory implementation ... posix
database-1 | selecting default max_connections ... 100
database-1 | selecting default shared_buffers ... 128MB
database-1 | selecting default time zone ... Etc/UTC
database-1 | creating configuration files ... ok
directus-1 |
directus-1 | ╭───────────────────────────────────────────────────╮
directus-1 | │ │
directus-1 | │ Update available! │
directus-1 | │ │
directus-1 | │ 10.8.3 → 10.10.4 │
directus-1 | │ 9 versions behind │
directus-1 | │ │
directus-1 | │ More information: │
directus-1 | │ https://github.com/directus/directus/releases │
directus-1 | │ │
directus-1 | ╰───────────────────────────────────────────────────╯
directus-1 |
database-1 | running bootstrap script ... ok
directus-1 | Error: connect ECONNREFUSED 172.25.0.3:5432
directus-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
directus-1 | errno: -111,
directus-1 | code: 'ECONNREFUSED',
directus-1 | syscall: 'connect',
directus-1 | address: '172.25.0.3',
directus-1 | port: 5432
directus-1 | }
directus-1 exited with code 1
It then re-starts and continues to populate the DB, but I guess this should not happen :)
I guess it's trying to connect to the DB before it's ready.
Found this thread. https://github.com/directus/directus/issues/20542
Seems like more a docker container issue than a Directus issue.
Might be the case, which could probably fixed by using docker compose healthcheck.