Skip to content

add a 'restart' action to watch attribute in the develop section#423

Merged
glours merged 1 commit intocompose-spec:masterfrom
glours:watch-restart
Oct 17, 2023
Merged

add a 'restart' action to watch attribute in the develop section#423
glours merged 1 commit intocompose-spec:masterfrom
glours:watch-restart

Conversation

@glours
Copy link
Contributor

@glours glours commented Oct 12, 2023

What this PR does / why we need it:
Add a new action restart to the watch attribute of the develop section.
This action will first sync files and the restart the container.

Which issue(s) this PR fixes:

Fixes docker/compose#11062

develop.md Outdated
- `rebuild`, Compose rebuilds the service image based on the `build` section and recreates the service with the updated image.
- `sync`, Compose keeps the existing service container(s) running, but synchronizes source files with container content according to the `target` attribute.
- `sync`, Compose keeps the existing service container(s) running, but synchronizes source files with container content according to the `target` attribute.
- `restart`, Compose synchronizes source files with container content according to the `target` attribute. and then restarts the container.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `restart`, Compose synchronizes source files with container content according to the `target` attribute. and then restarts the container.
- `restart`, Compose synchronizes source files with container content according to the `target` attribute, and then restarts the container.

Wrong button..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder restart actually also does a sync, and at some point we might want to introduce support for some "restart-only" action. So I'd suggest we introduce a more explicit sync+restart action - or any better notation, be creative ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this option let's do that 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thanks to both of you 🤗

develop.md Outdated
- `rebuild`, Compose rebuilds the service image based on the `build` section and recreates the service with the updated image.
- `sync`, Compose keeps the existing service container(s) running, but synchronizes source files with container content according to the `target` attribute.
- `sync`, Compose keeps the existing service container(s) running, but synchronizes source files with container content according to the `target` attribute.
- `restart`, Compose synchronizes source files with container content according to the `target` attribute. and then restarts the container.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder restart actually also does a sync, and at some point we might want to introduce support for some "restart-only" action. So I'd suggest we introduce a more explicit sync+restart action - or any better notation, be creative ;)

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.

Watch action: restart

3 participants