Skip to content

Add simple restart action (without sync) to Compose Watch for use with bind mounts #11446

@binaryfire

Description

@binaryfire

Hi guys

We use bind mounts for local development, and there are still times when you need to restart the container on file changes. Laravel's queue workers are a good example - they need to be restarted to pick up on changes and there's no simple way to automate that without a package and some custom code.

Currently there's no Compose Watch action that covers this scenario. sync+restart expects a target that it can sync files to. Would it be possible to add a simple restart action that can just watch files at a given path and restart the container if anything changes? This would make our (and I'm sure many other people's) lives much easier. I'm assuming this would be pretty easy to add: the functionality is there, it's just currently always coupled to a sync?

PS. This has been requested before here: #11062 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions