Make containers come back at host restart #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tweak container restart policies to increase their chances of coming back if the host restarts or the container crashes.
When our docker host last rebooted, only cassandra, core and glowroot came back for emap-dev. In particular, the waveform-reader didn't come back, and unknown to me there was some data directing to it that we wanted to keep.
So trying to prevent this happening again.
I can't explain why core came back but rabbitmq didn't, since they both had "on-failure" before this change. And more containers depend on rabbitmq than core, so I don't think that's the cause.
I'm aware that some containers need to be able to exit cleanly without being restarted (hl7-reader and hoover), so nothing more aggressive than "on-failure" can be used in that case. This could be a problem because the docs say:
We certainly want hl7-reader to come back following a docker daemon (or host) restart, so this may require further work.