Re: Oficial Docker Container
Posted: Thursday 09 February 2023 18:29
even sudo docker volume create portainer_data results in nothing...
I haven't tested because restarting the container is fast and efficient enough.waltervl wrote: Thursday 09 February 2023 19:25 For the docker users here, is the system reboot function (menu setup - reboot) working in a Domoticz Docker? Asking for viewtopic.php?f=6&t=39878
nitpicker wrote: Thursday 09 February 2023 17:29 I don't know why, but I cannot start containers.
Docker compose can be installed with
From this moment you should not have to use 'sudo'Code: Select all
sudo apt-get update && sudo apt-get upgrade curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh sudo usermod -aG docker ${USER} sudo systemctl enable docker sudo reboot
Anyway, you should also not chmod +x the docker compose configuration file (docker-compose.yml)
There is also no need to create any volumes as the configuration file of the Domoticz docker compose file already does this for you
What the above means is, create a local volume 'data' (./data)Code: Select all
volumes: - ./data:/opt/domoticz/userdata
This is great as here is stored everything you need.
Make a backup of this folder (or even better, the folder where you placed the docker-compose.yml file in (here will also be the data folder created)
To start the domoticz docker you then issue
or for previous docker-compose installationsCode: Select all
docker compose up -d
(note the dash between docker and compose)Code: Select all
docker-compose up -d
That's all, and now you should be able to browse to port 8080 of this machine
If you need to connect a USB device to the docker
issue
ls -al /dev/serial/by-id
you should see your serial devices
Next you edit the file docker-compose.yml
remove the # infront of the lines (take care of the indenting of the lines!)Code: Select all
# devices: # - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
make sure the serial line contains the right path (that you found above)
instead of /dev/ttyACM0 you can use /dev/ttyUSB0 and/or /dev/ttyUSB1
next you restart the docker container with
docker compose restart
or
docker compose stop
docker compose up -d
Now when you refresh the hardware page in domoticz, you should see the serial port
And that's it
And as said, please do some reading about docker-compose, you need to do it once and it will give you pleasure for the rest of live
This doesn't work in docker.waltervl wrote: Thursday 09 February 2023 19:25 For the docker users here, is the system reboot function (menu setup - reboot) working in a Domoticz Docker? Asking for viewtopic.php?f=6&t=39878
Code: Select all
version: '3.3'
services:
rpi-influxdb:
restart: always
ports:
- '8086:8086'
container_name: myInfluxDB
volumes:
- '/var/mydata/influxdb:/data'
image: hypriot/rpi-influxdb
grafana:
restart: always
ports:
- '3010:3000'
volumes:
- '/var/lib/grafana:/grafana_data'
container_name: myGrafana
image: grafana/grafana
eclipse-mosquitto:
restart: always
ports:
- '1883:1883'
- '9001:9001'
container_name: myMosquitto
volumes:
- '/var/mydata/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf'
- '/var/mydata/mosquitto/data:/mosquitto/data'
- '/var/mydata/mosquitto/log:/mosquitto/log'
image: 'eclipse-mosquitto:latest'
node-red:
restart: always
ports:
- '1880:1880'
volumes:
- '/var/mydata/nodered/data:/data'
container_name: myNodered
image: 'nodered/node-red:latest'
domoticz:
image: domoticz/domoticz:beta
container_name: myDomoticz
restart: unless-stopped
# Pass devices to container
devices:
- "/dev/serial/by-id/usb-Arduino__www.arduino.cc__Arduino_Mega_2560_852353331353518060D0-if00:/dev/ttyACM0"
- "/dev/snd/:/dev/snd/"
ports:
- "8080:8080"
- "8088:8088"
- "8443:443"
- "5000:5000"
- "1012:1012"
- "49000:49000"
volumes:
- ./userdata:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
nefiteasy-http-server:
restart: always
ports:
- '3000:3000'
container_name: myNefitEasy
environment:
- NEFIT_SERIAL_NUMBER=4180xxxxx
- NEFIT_ACCESS_KEY=BNBsFYnZ4S6xxxxx
- NEFIT_PASSWORD=xxxx
image: trafex/nefiteasy-http-server
duplicati:
image: lscr.io/linuxserver/duplicati:latest
container_name: myDuplicati
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- CLI_ARGS= #optional
volumes:
- /var/mydata/duplicati:/config
- /var/mydata:/source
- /opt:/source
ports:
- 8200:8200
restart: unless-stoppedI connect from the outside using a VPN and I do not use any Zwave deviceshjzwiers wrote: Monday 31 July 2023 8:21 Wow, it seems as though you took care of domotics and nefit
How is acces from the outside with this setup?
And I also have IDetect running whish needs tweaking also.
But this seems like a good way to start! I may give it a go. I wonder how I can make the transition of 35 Zwave devices better than it is with the current setup.
I've implemented ZWaveJS2MQTT mid last year under docker. I'm using port 8091 to open control panel of Zwave. Does that help?hjzwiers wrote: Tuesday 01 August 2023 15:27 I now see that Zwave-js uses port 3000 and nefit also uses that poort, so i need to change this but I am wondering which one
As that is a default of ZwavejsUI for HomeAssistant integration? But not related to Domoticz docker so slightly off topic in this discussion.