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

Shared services, like docker proxy, should not be destroyed by default when a destroy action is run #262

Closed
jazzsequence opened this issue Jan 27, 2021 · 2 comments · Fixed by #391

Comments

@jazzsequence
Copy link
Contributor

When composer server destroy is called, docker_proxy_1 is destroyed with the rest of the local server containers. However, if I have multiple environments on my local machine, that means that if I had another instance running, it will break.

As a developer, I expect my different environments to be kept separate, therefore I wouldn't expect one (running) environment to be affected by a composer server destroy action called on another environment.

Proposed tactics

  • Default behavior leaves the docker_proxy shared container
  • There could be a flag to specify a --clean destroy action, which removes all containers (including the proxy), e.g. composer server destroy --clean
@roborourke
Copy link
Contributor

Noting here that this was done intentionally in #163 as the only to remove the proxy container was manually, see this comment on a related issue #70 (comment)

I'd rather we look at detecting other running local server instances or containers using the proxy before removing it in a programmatic way if at all possible.

I'd also suggest that perhaps as well as having the flag option we could add a second question prompt to ask whether you want to destroy the proxy container too, and then act accordingly.

@kadamwhite
Copy link
Contributor

detecting other running local server instances

It's not just running, but also suspended servers, which I'd want to detect. I've gotten into trouble if the proxy got deleted while another server was suspended, in the past.

Could we ask Docker for a list of containers, and only remove the Proxy if we don't detect another one in the format we expect like *_nginx_1?

roborourke added a commit that referenced this issue Dec 7, 2021
hm-backport bot pushed a commit that referenced this issue Dec 7, 2021
roborourke added a commit that referenced this issue Dec 7, 2021
roborourke added a commit that referenced this issue Dec 7, 2021
roborourke added a commit that referenced this issue Dec 7, 2021
roborourke added a commit that referenced this issue Dec 7, 2021
roborourke added a commit that referenced this issue Dec 7, 2021
joehoyle added a commit that referenced this issue Jan 22, 2024
5.0.13

- [Backport v5.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #263

6.0.13

- [Backport v6.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #264

8.2.12

- [Backport v8.2-branch] Bump php from 8.2.12-fpm-bookworm to 8.2.13-fpm-bookworm by @hm-backport in #258
- [Backport v8.2-branch] Bump php from 8.2.13-fpm-bookworm to 8.2.14-fpm-bookworm by @hm-backport in #260
- Update Afterburner to 0.5.0 by @joehoyle in #262
joehoyle added a commit that referenced this issue Jan 22, 2024
5.0.13

- [Backport v5.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #263

6.0.13

- [Backport v6.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #264

8.2.12

- [Backport v8.2-branch] Bump php from 8.2.12-fpm-bookworm to 8.2.13-fpm-bookworm by @hm-backport in #258
- [Backport v8.2-branch] Bump php from 8.2.13-fpm-bookworm to 8.2.14-fpm-bookworm by @hm-backport in #260
- Update Afterburner to 0.5.0 by @joehoyle in #262
joehoyle added a commit that referenced this issue Jan 22, 2024
5.0.13

- [Backport v5.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #263

6.0.13

- [Backport v6.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #264

8.2.12

- [Backport v8.2-branch] Bump php from 8.2.12-fpm-bookworm to 8.2.13-fpm-bookworm by @hm-backport in #258
- [Backport v8.2-branch] Bump php from 8.2.13-fpm-bookworm to 8.2.14-fpm-bookworm by @hm-backport in #260
- Update Afterburner to 0.5.0 by @joehoyle in #262
joehoyle added a commit that referenced this issue Jan 22, 2024
5.0.13

- [Backport v5.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #263

6.0.13

- [Backport v6.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #264

8.2.12

- [Backport v8.2-branch] Bump php from 8.2.12-fpm-bookworm to 8.2.13-fpm-bookworm by @hm-backport in #258
- [Backport v8.2-branch] Bump php from 8.2.13-fpm-bookworm to 8.2.14-fpm-bookworm by @hm-backport in #260
- Update Afterburner to 0.5.0 by @joehoyle in #262
hm-backport bot pushed a commit that referenced this issue Jan 26, 2024
5.0.13

- [Backport v5.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #263

6.0.13

- [Backport v6.0-branch] Update Afterburner to 0.5.0 by @hm-backport in #264

8.2.12

- [Backport v8.2-branch] Bump php from 8.2.12-fpm-bookworm to 8.2.13-fpm-bookworm by @hm-backport in #258
- [Backport v8.2-branch] Bump php from 8.2.13-fpm-bookworm to 8.2.14-fpm-bookworm by @hm-backport in #260
- Update Afterburner to 0.5.0 by @joehoyle in #262
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

Successfully merging a pull request may close this issue.

4 participants