-
Notifications
You must be signed in to change notification settings - Fork 32
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
added endpoint for docker pull #36
Conversation
Awesome! Thanks for kick-starting this. So just to confirm, if I wanted to pull the latest Home Assistant release, I would go to
|
Yeah, that's right, but now that you've typed it out I'm wondering if there'd be a parsing error. If so, could use two different url path parameters and reconstruct the |
index.js
Outdated
/** | ||
* Pull the lastest image for the given repository, with or without tag | ||
*/ | ||
app.get('/pull/:repoTag', function (req, res) { |
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 might be better to set this to
app.get('/pull/:repoTag', function (req, res) { | |
app.get('/pull/*', function (req, res) { |
From there, we can then determine what to pull. With that above, req.params[0]
should be set to homeassistant/home-assistant:rc
for example.
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.
👍
One thing that comes to mind here is timeouts. For example if a user called the I may need to come up with the concept of webhooks. Where the user could make a That |
Good thought! I like the idea of a callback uri that could be a webhook platform automation trigger. It’d be up to the user to fill out the automation with something like sending a notification that the docker pull has finished, or sending a request to another ha-dockermon endpoint triggering container removal and restart. |
Indeed. For this PR at least, what you've got now with just a basic Once this PR is merged, I can then work on the webhook and |
Here you go! Thanks for your work on the pod btw, big fan. Happy to help with further webhook work as time allows. |
Thanks for the contribution! I will merge this into the For now I'm going to have a think about the best approach for either a webhook or something else approach. Cheers! |
@philhawthorne any chance of this getting merged into master soon? It is a very useful endpoint! |
Sure is @addisonlynch I'm hoping to package it up as part of the MQTT additions I'm doing. But for now you can use this endpoint by using the |
@philhawthorne - first thanks a lot for the ha-dockermon ,great work!
it would be really great if ha-dockermon wil;l have the functionality for upgrading containers version . |
Hi @avico78 Check the I'm still testing this myself, just haven't had a chance to work on it much lately. Hoping to do a new release soon with MQTT and the other contributions like this. |
I remove latest and install edge ...run get for pull request without success:
am I missing something? |
I was checking out this project and #20 and thought I'd take a quick stab at this. Ultimately, I'd like to be able to implement a home assistant script, triggerable from the front-end, that does the equivalent of a pull, rm, and run to update home assistant. I think the next step would be to implement an endpoint that does the removing and subsequent running. I just followed the dockerode docs example but don't have any prior experience with the library.