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

docker-compose.yaml: Restart on failure #360

Closed
wants to merge 1 commit into from

Conversation

nuclearcat
Copy link
Member

In kubernetes it is expected containers might fail and quit, so we can duplicate this behavior in docker as well. While failure is not normal and we should avoid it, but we should not assume it is critical issue in container environment.

Failure might be expected in situations like this: #358
Or for example if API service was temporary unreachable.

In kubernetes it is expected containers might fail and quit,
so we can duplicate this behavior in docker as well.
While failure is not normal and we should avoid it, but we should
not assume it is critical issue in container environment.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Copy link
Contributor

@gctucker gctucker left a comment

Choose a reason for hiding this comment

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

I think the reason why this wasn't enabled initially is because the docker-compose deployment is mostly meant to be used by developers, and it's better to not automatically restart services when they're failing while working on the code as it just gets in the way.

Whatever works best for developers. If this was to address production use-cases then I don't think it's a good idea. If it's because developers generally find it useful then it probably makes more sense.

@RCN What do you think?

@r-c-n
Copy link

r-c-n commented Dec 12, 2023

Personally, while debugging I prefer if things don't restart automatically after they crash so I can notice and go through the stack trace. Maybe we can keep these changes if they're useful for the general public and split the current version (without the restart: on-failure lines) to a docker-compose-dev.yaml file that's meant to contain specific configs more useful for developers. @nuclearcat how does that sound?

@nuclearcat
Copy link
Member Author

I think I agree with the collective and reasoned opinion. The only problem, like recently during staging issues, when the server was overloaded, all the containers “died” due to the fact that containers couldn't contact the API server or due to problems with DNS resolving. On the other hand, they should not “crash” if they experience temporary problems with the network...

@nuclearcat nuclearcat closed this Dec 13, 2023
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.

3 participants