Opened 6 years ago
Closed 3 years ago
#50342 closed defect (bug) (duplicate)
Local development environment installation doesn't wait for the mysql container to start
| Reported by: | johnbillion | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Build/Test Tools | Version: | 5.3 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
Description
Given a user who is installing the local development environment for the first time according to instructions in the project's readme file, the mysql container is not guaranteed to be fully up and running when the npm run env:start script ends, which means the subsequent npm run env:install script will fail when it cannot connect to the mysql host.
This is quite easy to reproduce by copying and pasting those four commands into your terminal so they execute in succession.
Can the npm run env:start script be made to wait until mysql is ready before terminating?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This can also be demonstrated by chaining commands.
npm run env:start && npm run env:installAccording to the Docker compose documentation, the
depends_oncan be used to control start up order, but Docker does not wait for each service to be "ready".There is
wait-oncurrently loaded and used in thelocal-env/scripts. Looks like that could probably be used here as well.