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

restart <service> will restart all dependent services #1685

Closed
@BretFisher

Description

@BretFisher

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

Metadata

Metadata

Assignees

Labels

compatibilityCompatibility with docker-compose

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions