Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

restart <service> will restart all dependent services #1685

Closed
BretFisher opened this issue May 18, 2021 · 0 comments · Fixed by #1693
Closed

restart <service> will restart all dependent services #1685

BretFisher opened this issue May 18, 2021 · 0 comments · Fixed by #1693
Assignees
Labels
compatibility Compatibility with docker-compose

Comments

@BretFisher
Copy link

Description

In the old docker-compose restart <service> it only restarts that specific service.

In docker compose restart <service> it will first restart services that depends on, including DB's. If healthchecks are used for depends_on, it'll then have to re-wait for dependent services to be ready again.

Steps to reproduce the issue:

  1. Create two services in a compose file where Service1 depends_on Service 2.
  2. Restart Service1.

Describe the results you received:

Service2 will restart, and then Service1 will restart.

Describe the results you expected:

Only Service1 should be affected.

Additional information you deem important (e.g. issue happens only occasionally):

Using Docker Compose version 2.0.0-beta.1 in Docker Desktop 3.3.3 (64133) on macOS

Output of docker version:

Client:
 Cloud integration: 1.0.14
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.16.3
 Git commit:        370c289
 Built:             Fri Apr  9 22:46:57 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.

default
@ndeloof ndeloof self-assigned this May 20, 2021
@ndeloof ndeloof added compatibility Compatibility with docker-compose compose labels May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compatibility Compatibility with docker-compose
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants