Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some errors during in-docker database initial setup #75

Open
rantoniuk opened this issue Mar 21, 2024 · 2 comments
Open

Some errors during in-docker database initial setup #75

rantoniuk opened this issue Mar 21, 2024 · 2 comments
Labels

Comments

@rantoniuk
Copy link

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 :)

@bryantgillespie
Copy link
Contributor

I guess it's trying to connect to the DB before it's ready.

Found this thread.
directus/directus#20542

Seems like more a docker container issue than a Directus issue.

@rantoniuk
Copy link
Author

Might be the case, which could probably fixed by using docker compose healthcheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants