Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.
  1. Home
  2. openLuup
  3. Docker
  4. Moving to Docker
Moving to Docker
akbooerA

A number of folk are running openLuup on Docker...

...and I'm about to try the same.

There are a couple of epic threads in the old place:

Dec 10, 2015 openLuup on Synology via Docker openLuup on Synology via Docker

Hi all. I would like to start a thread dedicated to running openLuup on Synology via Docker. I have successfully downloaded the airedale/openluup/ docker and have it running with AltUI, but am running into the issue of non-persistence after stop/start and limited success with adding...

Aug 16, 2018 openLuup on Docker (Hub) openLuup on Docker (Hub)

To simplify plugin development I created a Docker image for openLuup and made it available on Docker Hub. The Docker image is based on Debian (9, slim) and installs the master branch release of openLuup. The image uses the automated installation script of openLuup and therefore also contains...

Much of the heavy lifting appears to have been done by @vwout there (and I've asked if they'll join us here!) There's a great GitHub repository:

GitHub - vwout/docker-openluup: Dockerized openLuup environment with AltUI GitHub - vwout/docker-openluup: Dockerized openLuup environment with AltUI

Dockerized openLuup environment with AltUI. Contribute to vwout/docker-openluup development by creating an account on GitHub.

Hoping to get a conversation going here (and a new special openLuup/Docker section) not least because I know I'm going to need some help!

Docker
Openluup docker filling up disk space?
PerHP

I've been doing other projects the past weeks, and now started seeing sluggish behaviour in the system.. SSH'ed in, and noticed that the harddrive was completely full!

I had some other issues as well that caused it to fill up, but i noticed that when I removed the openluup container, that freed up 1.5GB!
This is obviously not the persistent storage folder (cmh-ludl), what else can do this?

On the base system, it showed as a massive sized /overlay2 folder in the /var/lib/docker/..

Mabye @vwout knows some docker-hints on this?

Docker
InfluxDB 1.x in docker
PerHP

I've now gotten most of my applications/components into the docker system, only one left is influxdb.
I allready have the database files on an external SSD, and the plan was to have a volume for the influxDB (which holds the .conf file), and a bind mount to the database folder.

This is however not the only files of influxdb that needs to be persistent, when i load up the docker, influx has no information about the databases, even when i know the database folder is available.
Anyone here know where influxDB stores database setup info? influxdb.conf just enables stuff and sets folders, the info on existing databases and settings is stored elsewhere.

(should the docker forum be under software, not openluup?)

Docker
Grafana on Docker
akbooerA

As part of my hardware infrastructure revamp (a move away from 'hobby' platforms to something a bit more solid) I've just switched from running Grafana (a very old version) on a BeagleBone Black (similar to RPi) to my Synology NAS under docker.

Despite the old system being on the same platform as my main openLuup instance (or, perhaps, because of this) and now with the new system the data has to be shipped across my LAN, this all seems to work much faster.

I had been running Grafana v3.1.1, because I couldn't upgrade on the old system, but now at 7.3.7, which seems to be the latest Docker version. It's a bit different UI from the old one, and needed next to no configuration, apart from importing the old dashboard settings.

One thing I'm missing is that the old system had a pull-down menu to switch between dashboards, but the new one doesn't seem to have that, since it switches to a whole new page with a list of dashboards. This doesn't work too well on an iPad, since it brings up the keyboard and obscures half the choices. Am I missing something obvious here?

Thanks for any suggestions.

Docker

Moving to Docker

Scheduled Pinned Locked Moved Docker
62 Posts 11 Posters 11.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • akbooerA Offline
    akbooerA Offline
    akbooer
    replied to RHCPNG on last edited by
    #13

    @rhcpng

    Ooh, super – another Docker expert.

    I'm really stuck. I think that there's a vital piece of documentation that I haven't found/read. Whether this is Synology, or Docker, or GitHub/vwout, I'm not sure...

    • I have Docker installed in Synology
    • I have the (alpine) version of openLuup installed and running (apparently)
    • but I can't access it at all or work out where the openLuup files go.

    I think this is something to do with the method of persisting data:

    docker-compose.yml

    and whilst I understand that there are (probably) some commands to be run:

    docker run -d \
           -v openluup-env:/etc/cmh-ludl/ \
           -v openluup-logs:/etc/cmh-ludl/logs/ \
           -v openluup-backups:/etc/cmh-ludl/backup/ \
           -p 3480:3480
           vwout/openluup:alpine
    

    I don't know where that goes either.

    So I feel stupid, and stuck. (Nice, in fact, to understand how others feel when approaching something new.)

    Any pointers, anyone?

    R K 2 Replies Last reply
    1
    • R Offline
      R Offline
      RHCPNG
      replied to akbooer on last edited by
      #14

      @akbooer
      I'm far from an expert, but have some experience with it yes. I haven't composed a container through yaml yet.

      You first need to define/create the volumes, that's when you can state where the volumes should be "placed" and where the data resides. This can be a local directory or a nfs mount for example. Default, it creates a dir in the docker dir.

      If you are not a Linux expert, like me (although I can manage), I would advise installing Portainer first. It gives you a nice GUI for managing your dockers. Far easier than doing everything through command line.

      1 Reply Last reply
      1
      • K Offline
        K Offline
        kfxo
        replied to akbooer on last edited by
        #15

        @akbooer said in Moving to Docker:

        • but I can't access it at all or work out where the openLuup files go.

        You are using the synology docker package to create and deploy your container, correct? At minimum, to get the container accessible, change the port settings to 3480(local):3480(container). Then you should be able access it at http://YourSynologyIP:3480/

        akbooerA 1 Reply Last reply
        1
        • akbooerA Offline
          akbooerA Offline
          akbooer
          replied to kfxo on last edited by
          #16

          @kfxo said in Moving to Docker:

          You are using the synology docker package to create and deploy your container, correct?

          Yes, that's correct for now. I need also to investigate Portainer, apparently.

          @kfxo said in Moving to Docker:

          change the port settings to 3480(local):3480(container).

          OK, I was looking for where to do that, but I guess, I'll look harder. Thanks.

          1 Reply Last reply
          0
          • akbooerA Offline
            akbooerA Offline
            akbooer
            wrote on last edited by
            #17

            ... Oh, THOSE settings!

            Thanks again.

            1 Reply Last reply
            0
            • akbooerA Offline
              akbooerA Offline
              akbooer
              wrote on last edited by akbooer
              #18

              It's MAGIC !

              I particularly like the look of this...

              Screenshot 2020-12-08 at 17.24.46.png

              This instills a sense of wonder in me... I mean, I know (almost) exactly how openLuup works, but to see it wrapped in a container running on a NAS, seems rather special. "Hats off" ("chapeau?") to those who have engineered this, not least @vwout.

              One is never quite finished, however.

              I understand that to make any changes last across container/NAS restarts, I need to make the volumes external to the container, as per the above yaml. So this is my next step.

              Any further insights welcomed. Perhaps Portainer is that next step?

              K 2 Replies Last reply
              0
              • R Offline
                R Offline
                RHCPNG
                wrote on last edited by
                #19

                I'm not familiar with the docker GUI of Synology, maybe that's good enough. But Portainer is widely used for managing docker containers. I like it. It is quite easy to create volumes and the sorts.

                1 Reply Last reply
                1
                • K Offline
                  K Offline
                  kfxo
                  replied to akbooer on last edited by
                  #20

                  @akbooer said in Moving to Docker:

                  I understand that to make any changes last across container/NAS restarts, I need to make the volumes external to the container, as per the above yaml. So this is my next step.

                  Any further insights welcomed. Perhaps Portainer is that next step?

                  You cannot create named volumes through the synology GUI. You will need to use portainer or you can ssh into your synology and run the manual commands as outlined by vwout/openluup

                  You can also do this manually. Start by creating docker volumes:

                  docker volume create openluup-env
                  docker volume create openluup-logs
                  docker volume create openluup-backups

                  Create an openLuup container, e.g. based on Alpine linux and mount the created (still empty) volumes:

                  docker run -d
                  -v openluup-env:/etc/cmh-ludl/
                  -v openluup-logs:/etc/cmh-ludl/logs/
                  -v openluup-backups:/etc/cmh-ludl/backup/
                  -p 3480:3480
                  vwout/openluup:alpine

                  1 Reply Last reply
                  1
                  • K Offline
                    K Offline
                    kfxo
                    replied to akbooer on last edited by kfxo
                    #21

                    @akbooer
                    I have been messing with this today. I do not currently run openluup through docker so this may not even be the best way to do this but it is what I did to get it up and running and with the ability to easily see and manipulate all openluup files within "File Station" on the synology.

                    I created three folders on my synology:
                    /docker/openLuup/cmh-ludl
                    /docker/openLuup/logs
                    /docker/openLuup/backups

                    Then I created three volumes with a bind to the created folders
                    'openluup-env' bound to '/volume1/docker/openLuup/cmh-ludl'
                    'openluup-logs' bound to '/volume1/docker/openLuup/logs'
                    'openluup-backups' bound to '/volume1/docker/openLuup/backup'

                    I used portianer but you can ssh into your synology and use the command line to create these volumes with the binds, see this

                    Then I created the container using portainer making sure to set the correct ports and volume mappings, which can also be done in the command line with

                    docker run -d \
                           -v openluup-env:/etc/cmh-ludl/ \
                           -v openluup-logs:/etc/cmh-ludl/logs/ \
                           -v openluup-backups:/etc/cmh-ludl/backup/ \
                           -p 3480:3480
                           vwout/openluup:alpine
                    

                    Hope this helps.

                    Edit: The binds are not necessary, I only did it to make it easy to access the files. Without the bindings, the volumes are somewhat hidden on synology that is not easily accessible for example at '/volume1/@docker/volumes/openluup-env/_data'

                    1 Reply Last reply
                    2
                    • R Offline
                      R Offline
                      RHCPNG
                      wrote on last edited by
                      #22

                      Good explanation, this is where it comes down to. But in the end, you probably want the bind to make your data persistent and, more important, easy acccessible.

                      1 Reply Last reply
                      0
                      • akbooerA Offline
                        akbooerA Offline
                        akbooer
                        wrote on last edited by
                        #23

                        I'm still struggling with this. I've manually created some external folders, but can't get the multi-line command to work.

                        @vwout, following my new experience with AlpineWSL on a PC (which I assume to be something very similar to Docker) I created the whole of the cmh-ludl folder as one single external volume. This is really convenient. Is it possible to make the same configuration for a Docker image?

                        R V 2 Replies Last reply
                        0
                        • M Offline
                          M Offline
                          mrFarmer
                          wrote on last edited by
                          #24

                          Hi @vwout, can your docker image also be used on the arm64 platform (Pi4)? If not, how would I go about building one? I think with an Unbutu docker and then use the same setup as on a plain Pi.

                          I am setting up some new things on a Pi4 and came along this (https://github.com/SensorsIot/IOTstack) to use Dockers on a Pi. Looks like a very quick way to (re)build an environment from a basic starting point. Especially the split between user data and all else looks attractive.

                          Cheers Rene

                          1 Reply Last reply
                          0
                          • akbooerA Offline
                            akbooerA Offline
                            akbooer
                            wrote on last edited by
                            #25

                            Why would you want to do that? It’s not as though installing Lua is difficult. What am I missing?

                            M 1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              RHCPNG
                              replied to akbooer on last edited by RHCPNG
                              #26

                              @akbooer said in Moving to Docker:

                              I'm still struggling with this. I've manually created some external folders, but can't get the multi-line command to work.

                              @vwout, following my new experience with AlpineWSL on a PC (which I assume to be something very similar to Docker) I created the whole of the cmh-ludl folder as one single external volume. This is really convenient. Is it possible to make the same configuration for a Docker image?

                              I don't know what AlpineWSL is, but you can make a volume for your cmh-ludl folder and map it in vwout's docker container.

                              2841db44-81ef-4214-a5c8-2bb4931759c4-image.png

                              This is what it looks like in portainer, like a mapping. Really convenient, like you said.

                              akbooerA 1 Reply Last reply
                              1
                              • akbooerA Offline
                                akbooerA Offline
                                akbooer
                                replied to RHCPNG on last edited by
                                #27

                                @rhcpng

                                Thanks for that. I guess my question is why these have to be done separately, rather than just making cmh-ludl/ (and all its sub folders) external (which, effectively is what I’ve done for WSL.)

                                I was trying to do it on the command line, since Portainer seemed to be several hundreds of megabytes, which seemed a bit of overkill just for this task (which, I think, is all I need it for.)

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  RHCPNG
                                  wrote on last edited by
                                  #28

                                  You mean not splitting it up in backup, log and cmh-ludl? That's a choice of vwout. To be able to be flexible with what you store where, probably. You can do it with the command line too, but I'm not familiar with that. I don't think you have to do all mappings. Probably the cmh-ludl is enough, but I'm not sure.

                                  1 Reply Last reply
                                  1
                                  • M Offline
                                    M Offline
                                    mrFarmer
                                    replied to akbooer on last edited by
                                    #29

                                    @akbooer Well, if I have a complete openLuup setup, except my data, in a Docker and I need to rebuild a system from scratch I can just run a script, restore my data and be back up and running. Creating a complete new system from scratch takes a lot more. Especially if you need to do Grafana, DB, webserver, ... All the packages I need to install again (i never document that well for the next time) etc.

                                    akbooerA 1 Reply Last reply
                                    0
                                    • akbooerA Offline
                                      akbooerA Offline
                                      akbooer
                                      replied to mrFarmer on last edited by
                                      #30

                                      @mrfarmer

                                      Ah, I see. More of a backup, than anything else, then.

                                      M 1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        mrFarmer
                                        replied to akbooer on last edited by
                                        #31

                                        @akbooer a quick restore from a fatal crash of the Pi (SD/SSD) yes.

                                        1 Reply Last reply
                                        0
                                        • V Offline
                                          V Offline
                                          vwout
                                          replied to akbooer on last edited by
                                          #32

                                          @akbooer As @RHCPNG said, you can easily do this, once you have a running setup by copying the contents of /etc/cmh-ludl/ to a local folder, restart the container with that folder mounted to /etc/cmh-ludl/.

                                          The difference between using a volume and a folder mount is (amongst other details) how Docker handles this at first startup. When using a volume, Docker copies the contents of e.g. /etc/cmh-ludl/ when it is started with a empty new volume, to that volume. As of that moment all changes are kept in the volume and survive container restarts and updates.
                                          A mounted folder also preserves all settings, but in contrary to volumes, Docker does not copy the original contents of the mount target to the folder at first startup. This means you need to store create the files needed in /etc/cmh-ludl/ yourself, which makes it harder to initially get start (except for one who masters openLuup 😉 ).

                                          1 Reply Last reply
                                          2

                                          Recent Topics

                                          • Disaster recovery and virtualisation
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            5
                                            550

                                          • Remote access of Zwave stick from Z-wave server
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            3
                                            259

                                          • Organizing/ structuring rule sets and rules
                                            G
                                            gwp1
                                            0
                                            5
                                            330

                                          • Moving MSR from a QNAP container to RP 5 - some issues
                                            G
                                            gwp1
                                            0
                                            5
                                            281

                                          • Widget deletion does not work and landing page (status) is empy
                                            G
                                            gwp1
                                            0
                                            4
                                            256

                                          • Need help reducing false positive notifications
                                            T
                                            tamorgen
                                            0
                                            7
                                            445

                                          • Reactor (Multi-System/Multi-Hub) Announcements
                                            toggledbitsT
                                            toggledbits
                                            5
                                            120
                                            35.1k

                                          • Deleting widgets
                                            toggledbitsT
                                            toggledbits
                                            0
                                            4
                                            431

                                          • MQTT configuration question
                                            tunnusT
                                            tunnus
                                            0
                                            11
                                            580

                                          • System Configuration Check - time is offset
                                            G
                                            gwp1
                                            0
                                            8
                                            560
                                          Powered by NodeBB | Contributors
                                          Hosted freely by 10RUPTiV - Solutions Technologiques | Contact us
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Unsolved