8000 Add support for a `docker_compose` worker and prioritize its startup by tucksaun · Pull Request #370 · symfony-cli/symfony-cli · GitHub
[go: up one dir, main page]

Skip to content

Add support for a docker_compose worker and prioritize its startup #370

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

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

tucksaun
Copy link
Member
@tucksaun tucksaun commented Nov 2, 2023

It should fix #240.
based on #308

The idea is that when this specific worker is configured it will block the start up of other workers.

Also to be "sure" services are up we do the startup in a two-step process:

  1. first we start docker compose up -d which will return only once services are up
  2. then we:
    1. change the worker to start docker compose up instead, which will block until we stop the server and will stop the containers when being stopped
    2. unblock the other workers

@tucksaun tucksaun force-pushed the feat/docker-compose-worker branch from 2bd90c9 to c76c262 Compare November 2, 2023 18:50
@tucksaun
Copy link
Member Author
tucksaun commented Nov 2, 2023

Not entirely ready yet: I encounter a bunch of "no such process" error when exiting but I'm not sure where they come from

@tucksaun
Copy link
Member Author
tucksaun commented Nov 2, 2023

Actually, I get the "no such process" on main as well so I think we should be good for a review once #308 is merged :)

@fabpot
Copy link
Contributor
fabpot commented Nov 2, 2023

Can be rebased

@tucksaun tucksaun force-pushed the feat/docker-compose-worker branch from e25d762 to 549bdbf Compare November 3, 2023 08:11
@tucksaun
Copy link
Member Author
tucksaun commented Nov 3, 2023

@fabpot rebased

@fabpot fabpot merged commit de646d3 into symfony-cli:main Nov 3, 2023
@fabpot
Copy link
Contributor
fabpot commented Nov 3, 2023

Thank you @tucksaun

@stof
Copy link
stof commented Nov 6, 2023

@tucksaun will this work to expose the environment variables of docker services to the PHP server as well or is this worker still starting too late for that ?

@tucksaun tucksaun deleted the feat/docker-compose-worker branch November 6, 2023 11:18
@tucksaun
Copy link
Member Author
tucksaun commented Nov 6, 2023

@stof the PHP server determines the variables on every request so this should work out-of-the box

@maxhelias
Copy link
maxhelias commented Nov 6, 2023

Thanks @tucksaun for this awesome feature 👏

OskarStark added a commit to symfony/symfony-docs that referenced this pull request Nov 7, 2023
…jmsche)

This PR was submitted for the 6.4 branch but it was merged into the 5.4 branch instead.

Discussion
----------

[Symfony CLI] Document the new docker_compose option

See symfony-cli/symfony-cli#370

Commits
-------

142ce5f [Symfony CLI] Document the new docker_compose option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow configuring Docker compose to automatically start with server
4 participants
0