-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
restart option #478
Comments
+1 |
Regarding the top-level configuration (i.e. Configure the restart-policy for all services), there's another topic that discusses setting global/project-settings here #463 That PR uses |
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Signed-off-by: Paul Bonaud <[email protected]>
Please! Can't wait 👍 |
i'm impatiently waiting for this to land too :) |
+1 |
+1 Really interested in this for production use. Is there any way we can help with this feature? |
+1 @grepped |
+1 |
+1 |
You can use Upstart like service manager:
|
This patch adds the restart_policy parameter to services. The parameter is passed to the Docker API when starting containers. Its recognized values are the same as in the Docker CLI ("always" and "on-failure[:max-retry]"). For future compatibility, the policy can also be specified as a dictionary, which is passed directly to the Docker API (after converting the keys to CamelCase). This feature seems to have been requested at least in issue docker#478. Signed-off-by: Kenneth Falck <[email protected]>
Fixed in #594 |
I am trying to use restart option to fig as "restart: always ". But getting thrown back the error message "Unsupported config option for web service: 'restart'" . Is it already part of 1.0.1 release or need to added manually as a patch ? |
@heeren-cliqz it looks like 1.0.1 was release Nov 5, 2014 and this feature was merged in on December 9...so it's not in the 1.0.1 release as far as I can tell. |
@tomkersten Can you suggest me how to use restart feature? |
What doesn't work? |
restart option. Sorry not to be precise. I stop one container by issuing "fig stop container_name". But it didn't start after that. |
I haven't used restart policies much myself, but I believe that is the expected behaviour (otherwise you'd never be able to stop the container). I would try killing the process instead, to see if it restarts. |
Well I tried killing the process as well, but container is not restarting back. I think someone didn't test this behavior or there is more required than simply specify in fig file: |
Have you tried creating/starting the container directly with docker and kill it? Is the behavior the same? IIRC, |
Thanks @thaJeztah. After inspecting my docker containers, indeed the restart policies are changed as per specified criteria. |
I don't use Boot2docker, but that could of course be a factor. Still keep in mind that A nice blog about the restart-policies can be found here; http://www.tech-d.net/2014/09/30/docker-restart-policies/ ^^ @SvenDowideit (if you have time); Can you tell if boot2docker persistence makes a difference here? I also noted that the incrementing interval is not mentioned in the restart policies docs. I think that should be added somewhere, perhaps that whole section should be moved to the Docker run reference so that it can be explained more in depth? I'm happy to create a PR for that if you think it's a good idea. |
Signed-off-by: Paul Bonaud <[email protected]> Signed-off-by: Yuval Kohavi <[email protected]>
Hello All, Could some one give me steps how to set existing container to restart=always to autostart.Please find my image id and guide me on this. Image ID :e0418b2f81b4 |
Docker (v 1.2.0) now has an option for restart so containers can auto restart after machine/host reboot:
https://docs.docker.com/reference/commandline/cli/#run
Can we have that option in fig.yml? An e.g:
or more brilliant way, it will restart app stack (web and db):
Thanks.
The text was updated successfully, but these errors were encountered: