-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Clarify Update on Docker HA Core install #13542
Clarify Update on Docker HA Core install #13542
Conversation
@@ -66,7 +66,7 @@ After=docker.service | |||
[Service] | |||
Restart=always | |||
RestartSec=3 | |||
ExecStart=/usr/bin/docker run --name=home-assistant-%i -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant | |||
ExecStart=/usr/bin/docker run --name=home-assistant-%i -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove them altogether, as the proper way to handle this is using Docker itself, not systemd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid point. I didn't know that was built into Docker.
- Shall I make an issue for that and still push these for now? This change helped me get my install working.
- Shall I add a note that Docker has its own restart policy and this is preferred? Link to the Docker docs maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I say to include --restart=always
in the docker run
command? With this link: https://docs.docker.com/config/containers/start-containers-automatically/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is it.
If you are running your Home Assistant Core Docker as an autostarted service, then you should use the relevant commands to stop it, for example for systemd: | ||
```bash | ||
docker pull homeassistant/home-assistant:stable | ||
systemctl stop home-assistant@USERNAME | ||
systemctl start home-assistant@USERNAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get the username part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the naming convention for systemd services: https://www.home-assistant.io/docs/autostart/systemd/#next-steps
Okay, so perhaps it is better to do either or both of the following:
|
I also added some 'Core' to mentions of Home Assistant. |
The autostart documentation has been removed. Please rebase the PR to get rid of the changes made to that (or revert them). Adding the |
Oof that was not pretty. I haven't really used git rebase outside a tutorial, but I verified with a git diff against an up-to-date current that I now pushed the proper version to this branch. So you also agree on the change of mapping /etc/localtime instead of the New York string @frenck ? Only in the Linux instruction so far, haven't been able to test on Raspbian. |
The mapping of local time seems ok. This PR however, has an issue now, with all kinds of unrelated commits. This needs to be cleaned up first 👍 |
@frenck better? |
No, if you look here: https://github.com/home-assistant/home-assistant.io/pull/13542/commits You'll see all kind of commits that are not yours. You need to rebase it not merge branches. |
a010daa
to
3793de9
Compare
Thanks for your repeated help, I'm learning advanced git here 😄 . I think I've done what you just said now @frenck . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fhoekstra 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh noticed one little thing just before I wanted to hit merge:
Our images have a init system onboard, so the --init
isn't needed.
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Accepted, do you like being @'ed @frenck ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fhoekstra! 👍 🎉
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Proposed change
I could not find any clear instructions in the docs on how to update a Docker install of Home Assistant Core. It seems to be recommended over a virtualenv install, but there are no instructions on how to update your install, and even a conflicting run command between the systemd service file and the install docs.
I want to save others the hassle of figuring this out.
If I put anything in a wrong place, or if what I figured out is incorrect, please tell me. I do believe this information should be in the documentation.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
homeassistant/home-assistant:stable
/etc/localtime
). I am not sure if this is recommended, but it works for my install. Please confirm?Checklist
current
branch.next
branch.