debian-domoticz v1.0 (with letsencrypt and Toon API)
Posted: Wednesday 04 November 2020 21:36
I was using the Linuxserver docker image but I needed Toonapilib4domoticz to be included and installing it afterwards is not how it should be done.. So, I decided to make my own Domoticz docker image with Toonapilib4domoticz preinstalled.
Toonapilib4domoticz: https://github.com/JohnvandeVrugt/toonapilib4domoticz
Github: https://github.com/bpmb82/debian-domoticz
Dockerhub: https://hub.docker.com/r/bpmbee/debian-domoticz
I would like to share a docker-compose.yml that includes nginx-proxy and letsencrypt for valid certificates that auto-renew. I'm hoping someone finds this useful, it should get you up and running with Domoticz in a matter of minutes!
I'll be looking into making separate builds for the master and development versions of Domoticz next.
UPDATE: If you're using Cloudflare as DNS, you can include this docker image to update your Dynamic IP: https://hub.docker.com/r/bpmbee/cloudflare-dns-updater
Don't forget to edit the below file with the correct local paths and hostnames
Thanks to kiddigital in helping me out on the versioning issue (misunderstanding) I had!
Toonapilib4domoticz: https://github.com/JohnvandeVrugt/toonapilib4domoticz
Github: https://github.com/bpmb82/debian-domoticz
Dockerhub: https://hub.docker.com/r/bpmbee/debian-domoticz
I would like to share a docker-compose.yml that includes nginx-proxy and letsencrypt for valid certificates that auto-renew. I'm hoping someone finds this useful, it should get you up and running with Domoticz in a matter of minutes!
I'll be looking into making separate builds for the master and development versions of Domoticz next.
UPDATE: If you're using Cloudflare as DNS, you can include this docker image to update your Dynamic IP: https://hub.docker.com/r/bpmbee/cloudflare-dns-updater
Don't forget to edit the below file with the correct local paths and hostnames
Code: Select all
version: '3.3'
services:
proxy:
image: jwilder/nginx-proxy:alpine
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
container_name: domoticz-proxy
networks:
- domoticz_network
ports:
- 80:80
- 443:443
volumes:
- <local path>/conf.d:/etc/nginx/conf.d:rw
- <local path>/vhost.d:/etc/nginx/vhost.d:rw
- <local path>/html:/usr/share/nginx/html:rw
- <local path>/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: domoticz-letsencrypt
depends_on:
- proxy
networks:
- domoticz_network
volumes:
- <same local path of nginx-proxy>/certs:/etc/nginx/certs:rw
- <same local path of nginx-proxy>/vhost.d:/etc/nginx/vhost.d:rw
- <same local path of nginx-proxy>html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
domoticz:
image: bpmbee/debian-domoticz:version-1.1
container_name: domoticz
depends_on:
- proxy
environment:
- TZ=Europe/Amsterdam
- VIRTUAL_HOST=my-host.example.com
- VIRTUAL_PORT=8080
- LETSENCRYPT_HOST=my-host.example.com
- [email protected]
networks:
- domoticz_network
volumes:
- <local path>/data:/data
expose:
- "8080"
ports:
- 8118:8080 # only if you want local network access
devices:
- /dev/ttyUSB0:/dev/ttyUSB0 # used for ZWave or RFX 433 dongles
restart: unless-stopped
networks:
domoticz_network: