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

Restart always #84

Closed
wants to merge 1 commit into from
Closed

Conversation

Razikus
Copy link

@Razikus Razikus commented Jul 30, 2020

According to issue #83

@dfunckt
Copy link
Member

dfunckt commented Aug 12, 2020

Hey @Razikus it's not clear to me how this will help solve your use case. restart: always just means that Docker should restart a container if it exits, not run the container in the first place/at startup.

@Razikus
Copy link
Author

Razikus commented Aug 12, 2020

Hey @Razikus it's not clear to me how this will help solve your use case. restart: always just means that Docker should restart a container if it exits, not run the container in the first place/at startup.

Nope, it also start container at system startup, and on any failure
Check the docker documentation
https://docs.docker.com/config/containers/start-containers-automatically/

@dfunckt
Copy link
Member

dfunckt commented Aug 12, 2020

@Razikus I just tested this and it seems you're right.

I think however it's best to (1) only support a single entry point -- ie. the scripts/compose script -- and (2) not impose this behaviour on everyone. If you're still keen to have Docker start the containers at startup (and having the init system invoke it is not an option you like) you can still add the restart flag by extending the service definitions in your project's docker-compose file in config/docker-compose.yml.

@ab77
Copy link
Contributor

ab77 commented May 28, 2024

@Razikus Hello, (and a very, very late thank you for you contribution), we've updated the build/deploy scaffold for openBalena today, including using a single Docker composition. We've set the default restart unless-stopped on all containers (except for services which are responsible for e2e tests). Please feel free to reopen your PR, rebase on master and make any relevant contributions.

@ab77 ab77 closed this May 28, 2024
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