diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f2d0ee9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '2.1' + +services: + main-openhab: + image: openhab/openhab:2.0.0-${OPENHAB_ARCH:-amd64} + mem_limit: 2g + restart: always + user: ${OPENHAB_USER:-openhab:openhab} + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + - ./data/conf:/openhab/conf + - ./data/userdata:/openhab/userdata + - ./data/addons:/openhab/addons + tmpfs: + - /tmp:rw,size=100m + ports: + - "${OPENHAB_BIND:-127.0.0.1}:${OPENHAB_PORT:-8080}:8080" + diff --git a/openhab.conf b/openhab.conf new file mode 100644 index 0000000..f3622ba --- /dev/null +++ b/openhab.conf @@ -0,0 +1,14 @@ +# system architecture +# amd64, armhf, arm64 +# look at https://hub.docker.com/r/openhab/openhab/ for more details +OPENHAB_ARCH=amd64 + +# user configuration +# http://docs.openhab.org/installation/docker.html +# please add user like UID:GID +OPENHAB_USER=998:998 + +# network configuration +OPENHAB_BIND=127.0.0.1 +OPENHAB_PORT=8080 +