-
Notifications
You must be signed in to change notification settings - Fork 172
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
Add restart:always to the docker-compose #83
Comments
That's something that needs to be handled by your init system -- ie. start the openBalena containers at server startup. Do I miss your point? |
+1. Docker handles it's own starting and stopping, it is its own init system, another shouldn't be required. Agree that the init system makes sense for the included OpenBalena entry point script (although would suggest not using the script at all would be better for starting in production otherwise we are layering init systems), but when flattening docker-compose.yml a |
Update over on the Balena forums that has helped me resolve this: https://forums.balena.io/t/automatically-restarting-open-balena-after-reboot/205006/15 |
@dfunckt Why would you implement a new init system when docker has one built-in. For those that do not want to use the docker init an flag could be added to not add the The current way of having to make your own init script is just dumb. |
@florisvdk I’ve already replied why we won’t default to automatically starting the containers in a comment to the PR: #84 (comment) and offered a way to achieve that for those that need it. Pasting here for posterity:
Also, please keep your tone down. |
In addition to a more production ready restart policy, the issue of the My
How about including a file like this in the repository? Could be a By default, starting would then be in development mode, as it is now, so wouldn't be a breaking change for users. Starting by default in development mode (i.e. no restart) is fairly expected. But would provide a clear production workflow. The documentation could then be updated accordingly. Assuming wanting to avoid a larger overhaul of the workflow, production mode would be: Flatten compose file with script -> start using Updates would be: Pull latest updates -> flatten compose file with script -> docker-compose.prod.yml could then be maintained in this repo, so additional containers in the future, or production mode variables will be synced on the git pull. I wouldn't advise anyone to run in production mode by executing a script that executes Docker-Compose, through a systemd or any other init system, so think this would be a solid alternative rather than additional workflow. For development mode, as before, it can remain the same using the compose script. Would probably add |
@Maggie0002 what do you mean by "flatten compose file with script"? Can you provide a script for that? |
|
As this isn't going to be implemented by default, but there's a workaround for it, shouldn't this issue be closed? |
Hi i would like to make a little feature request here - add the restart:always to the docker-compose specification
Today i restarted my server, and after that i forgot to start openbalena again
Little thing but will make a life easier
The text was updated successfully, but these errors were encountered: