Skip to content

watch: rebuild also rebuilds depends_on services #13853

Description

@dgageot

Description

In compose watch, editing a service's code rebuilds not only that service but also the services it depends_on. Those dependencies are then rebuilt but not restarted.

Steps to reproduce

git clone https://github.com/dgageot/bug-compose

services:
  backend:
    build: ./backend
  frontend:
    build: ./frontend
    depends_on:
      - backend
    develop:
      watch:
        - action: rebuild
          path: ./frontend
docker compose up --build --watch
# edit ./frontend/main.go

Expected

Only frontend is rebuilt and restarted. backend is left untouched.

Actual

backend is rebuilt too (but not restarted).

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions