Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up"Still waiting for db to be ready... Or maybe the db is not reachable." #1656
Comments
|
How did you installed API Platform? As documented in the "getting started guide", using the Zip file is known to cause issues. Be sure to use the .tar.gz. Unfortunately we cannot tell GitHub to not provide the Zip. |
|
I used the .tar.x file and untar under wsl2. |
|
Thanks for the feedback! I don't own a Windows computer so I cannot debug this. It would be awesome if someone using Windows can help to track this down (and to fix the bug). |
It seems untaring into a wsl2 folder from Windows doesn't keep some linux permissions, even with a .tar.gz archive. Maybe just adding a chmod +x bin/console before the first composer install, in the Dockerfile, can solve this problem for wsl2 devs ? |
|
If this works, let's do this, even if I'm not a found of such hacks. |
|
You already use it in your Dockerfile, but after the first composer install. I don't like doing that on my dockerfiles too but sometimes... Now we can dev on wsl2, this kind of problem (files permissions) will be more and more frequent. I switched from dual boot Windows/Linux to Windows with wsl2 2 weeks ago and I'm facing this problem frequently now. (Yeah, I'm thinking switch back to dual boot lol). |
|
Hi, Process
Results I juste solve my problem with |
|
Maybe should we use |
I checked permissions for bin/console on the repo. It's 0755, so it's not a repo or archive problem. You're already did it in line https://github.com/api-platform/api-platform/blob/master/api/Dockerfile#L105 but it's after the first Composer do a
I know you don't like this, but... Moving the |
|
Let's do this! Do you want to work on a PR? |
I started to but... I mixed up two bugs reports for the same kind of problem. The other one was not related to api-platform but involved bin/console too. So, here the problem is for the "Still waiting" because bin/console is not executable in some situations. It's not because of a composer doing a cache:clear... I mixed up. Back to this problem: I tried different ways to install and run api-platform.
I did chmod +x on bin/console under WSL2, ran docker-compose up again and the problem was solved. So, it can't be fixed in the Dockerfile. It's a Windows and/or WSL2 problem only.
The problem is because of Windows. Even with the .tar.gz file :/ |
|
Some of my tests, I worked direct under my VPS (git clone, build...) because I thought the problem was my server (Linux) :/ |
Did you mount a host folder to a container ? |
No or not from myself ! I just clone from my server and I build with |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

API Platform version(s) affected: 2.5.7
Description
On a fresh install of API Platform package (.tar.gz), after running
docker-compose up, the PHP container is trying to run the commandbin/console doctrine:query:sql "SELECT 1"to see if the DB container is up and running.The problem is that bin/console file doesn't have the executable flag in the container, so PHP container can't see it's connected to DB and exited with an error.
How to reproduce
Still waiting for db to be ready... Or maybe the db is not reachable. x attempts leftPossible Solution
Applying +x flag to bin/console