Opened 5 years ago
Closed 14 months ago
#50342 closed defect (bug) (duplicate)
Local development environment installation doesn't wait for the mysql container to start
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Build/Test Tools | Keywords: | needs-patch |
Focuses: | Cc: |
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?
Change History (4)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
19 months ago
Note: See
TracTickets for help on using
tickets.
This can also be demonstrated by chaining commands.
npm run env:start && npm run env:install
According to the Docker compose documentation, the
depends_on
can be used to control start up order, but Docker does not wait for each service to be "ready".There is
wait-on
currently loaded and used in thelocal-env/scripts
. Looks like that could probably be used here as well.