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

Made the restart policies of Docker containers more consistent #94

Merged
merged 5 commits into from
Aug 28, 2024

Conversation

pendyurinandrey
Copy link
Contributor


  • I understand that contributing to this repository will require me to agree with the CLA

Description

I tried using Anytype as my own self-hosted note app and encountered an issue. When I deployed Anytype following the instructions in the README.md, the cluster worked well initially. However, after rebooting the VM, I noticed that while some Docker containers automatically started, others did not (specifically, Mongo, Coordinator, and Tools). After a brief investigation, I realized that the 'restart' policies of the containers were inconsistent. I have prepared this PR to address and fix this inconsistency.

Impact analysis: Based on the README.md, this project is intended for development and launching small personal clusters. I believe my changes will not negatively impact any users.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link

github-actions bot commented Aug 27, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@pendyurinandrey
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@pendyurinandrey
Copy link
Contributor Author

recheck

@pendyurinandrey pendyurinandrey changed the title Made the retry policies of Docker containers more consistent Made the restart policies of Docker containers more consistent Aug 27, 2024
@fb929
Copy link
Collaborator

fb929 commented Aug 27, 2024

@pendyurinandrey
I think that a more suitable policy would be "unless-stopped", because the "always" policy will always start containers when the Docker daemon restarts, even if the user manually stopped them and doesn't want them to start.

@pendyurinandrey
Copy link
Contributor Author

@fb929
I didn't use unless-stopped initially because of an old Docker bug docker/for-linux#652.
I retested this bug using following configuration:

docker --version
Docker version 27.2.0, build 3ab4256

lsb_release -d
Description:	Ubuntu 24.04.1 LTS

It was not reproduced. I might be still valid for other OS or Docker versions, but I cannot check it.
I updated always to unless-stopped in this PR.

@fb929 fb929 merged commit ceebb4a into anyproto:main Aug 28, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants