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

Waiting for the Database to be available 1/10 getting bigger then 10 #24

Open
zewas-digital opened this issue Jan 15, 2024 · 2 comments

Comments

@zewas-digital
Copy link

I am trying to install phpList with Docker.
I set the .env variables as shown in link with my own values.

When I deploy the container, it deploys fine, but when I try to access the application, I get a bad gateway error.

When I look in the logs, the message appears: Waiting for database to be available - 1/10 appears.
Now this message keeps appearing and I am currently at Waiting for database to become available - 66/10.
Do I need to add a database container myself or have I forgotten something?

@michield
Copy link
Member

Yes, you need to give a valid end-point for a DB connection. That can be another container, or a different server. Interesting it goes over 10, I will look into that. The idea is that if it didn't work in 10 steps, it's unlikely to work, so it should stop after 10 iterations. When you bring up two containers, it can take a little while for the DB to be ready, which is why this delay is there.

@dapasa
Copy link

dapasa commented Nov 7, 2024

In docker, I have fixed it using this env variables: DB_HOST, DB_USER, DB_PASSWORD, DB_NAME. In some way the config.php is taked from container phat /etc/phplist, but that config.php is using the mentioned variables instead of the ones into the .env file.

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

No branches or pull requests

3 participants