docker-compose and config file for openhab docker image

conf/ mariadb remove deprecated variable 6 years ago
.env add environment link 7 years ago
.gitignore ignore openhab.conf 6 years ago
README.md add help 6 years ago
backup.sh backup dtabase dir 6 years ago
clearPid.sh add workaround for restart failure 7 years ago
docker-compose.yml using default user 6 years ago
install.sh add database 6 years ago
openhab.conf.example using openhab as default db 6 years ago
README.md

Docker ocmpose file and config for openhab

Config

Use openhab.conf for configuration. At the first start, please execute ./install.sh to use the correct user ID in the config file. After taht you can create the container with:

docker-compose up -d

And then you can use openhab at http://localhost:8080.

Help

Database

Connect to database container:

source openhab.conf
mariadb -h 172.55.55.101 -uopenhab -p${OPENHAB_DATABASE_PASSWORD} openhab

Install the jdbc:mariadb persistence service and add the following lines to data/conf/services/jdbc.cfg:

url=jdbc:mariadb://db-openhab:3306/openhab
user=openhab
password=dbpw

Replace dbpw with your password from openhab.config.

weather binding

Copy these folders:

  • webapps/weather-data/layouts -> ./data/userdata/webapps/weather-data/layouts
  • webapps/weather-data -> ./data/conf/html/weather-data

And follow the instuctions to add static for all urls like this: https://community.openhab.org/t/html-layouts-in-oh2/8762/28?u=benjy

Openhab doku: https://www.openhab.org/addons/bindings/weather1/#html-layouts