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

Avoid starting all services on rebuild #12258

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhrotko
Copy link
Contributor

@jhrotko jhrotko commented Oct 31, 2024

What I did
When a service is rebuild during watch, it will trigger to start all services. We are specifying the services that should be started after a rebuild,

err = s.start(ctx, project.Name, api.StartOptions{
Project: project,
Services: []string{serviceName},
}, nil)

however we are ignoring the specified start services options.
err = InDependencyOrder(ctx, project, func(c context.Context, name string) error {
service, err := project.GetService(name)
if err != nil {
return err
}
return s.startService(ctx, project, service, containers, listener, options.WaitTimeout)

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did
silly ball

@jhrotko jhrotko self-assigned this Oct 31, 2024
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 this pull request may close these issues.

[BUG] docker compose up --watch restarts services that shouldn't
1 participant