Git Product home page Git Product logo

Comments (7)

NorthernMan54 avatar NorthernMan54 commented on May 24, 2024 1

Thanks for this detail, am thinking we can close this ?

from docker-homebridge.

NorthernMan54 avatar NorthernMan54 commented on May 24, 2024

@seanob86 Take a read of the documentation for docker compose down versus docker compose stop

Down stops containers and removes containers, networks, volumes, and images created by up

PS Tks for a great issue with detailed instructions to recreate the issue

from docker-homebridge.

seanob86 avatar seanob86 commented on May 24, 2024

Thanks! Yeah i know the difference between down and stop/restart. I just wanted to point out that updates are not persistent and if for example host system reboots/encounters power outage, those updates will need to be run again.

Hopefully there will be a solution for this in the future without relying on new updates to the image e.g. docker compose pull.

from docker-homebridge.

NorthernMan54 avatar NorthernMan54 commented on May 24, 2024

Just to ensure that my understanding was correct, I ran thru both reboot and power failure scenarios, and I did not lose the update to Homebridge-config-ui-x 4.50.5, but when using the down command I did lose the update.

Are you seeing something different

Latest docker, running on a RPI 3B, with the most recent docker-homebridge image.

from docker-homebridge.

seanob86 avatar seanob86 commented on May 24, 2024

You are right!! Reboot does not lose the updates. Thanks!
I forgot that I have a script for rebooting my host server which (prior to reboot), iterates through all my docker containers with docker compose down.

I suppose, as long as down is not used there should be no issues.
Another alternative which is working is to persist the /opt/homebridge directory and node and UI updates are persisting through docker compose down


    volumes:
      - ./config:/homebridge
      - ./homebridge:/opt/homebridge:rw

from docker-homebridge.

NorthernMan54 avatar NorthernMan54 commented on May 24, 2024

Are there any downsides to making this change ? Any impact when the container version is updated ?

from docker-homebridge.

seanob86 avatar seanob86 commented on May 24, 2024

I suppose the downside is any newer updates to node or the ui on an updated container, will most likely be overriden by what is on the host/volume mapping. So any versions in the volume mapping that is older will not get the benefits of the updates in the latest container. Therefore it's probably not recommended and best to update those components how it exists today, with the caveat that docker compose down will undo those updates.

I did further narrow down volume mappings for node and ui, so not all data in /opt persists. I'm going to leave these mapping on my configuration for now until I discover something that has broken (but for now everything is ok).

      - ./homebridge/bin/node:/opt/homebridge/bin/node:rw
      - ./homebridge/lib/node_modules/homebridge-config-ui-x:/opt/homebridge/lib/node_modules/homebridge-config-ui-x:rw

Prior to adding the above volume mappings, I copied /opt/homebridge/bin/node and /opt/homebridge/lib/node_modules/homebridge-config-ui-x/ out of the container to the host.

from docker-homebridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.