diff --git a/docker-compose.yml b/docker-compose.yml index 3138c9b..e39c8c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,8 @@ image: openhab/openhab:2.0.0-${OPENHAB_ARCH:-amd64} mem_limit: 2g restart: always - ##user: ${OPENHAB_USER:-openhab:eopnhab} + environment: + - USER_ID=${OPENHAB_USER_ID} volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro @@ -15,5 +16,7 @@ tmpfs: - /tmp:rw,size=100m ports: - - "${OPENHAB_BIND:-127.0.0.1}:${OPENHAB_PORT:-8080}:8080" + - "${OPENHAB_HTTP_BIND:-127.0.0.1}:${OPENHAB_HTTP_PORT:-8080}:8080" + - "${OPENHAB_HTTPS_BIND:-127.0.0.1}:${OPENHAB_HTTPS_PORTS:-8443}:8443" + - "${OPENHAB_OSGI_BIND:-127.0.0.1}:${OPENHAB_OSGI_PORT:-5555}:5555" diff --git a/install.sh b/install.sh index 5344d64..2c28259 100755 --- a/install.sh +++ b/install.sh @@ -23,5 +23,5 @@ chmod -R 770 data # replace uid and gid in config file -sed -i "/^OPENHAB_USER/c\\\OPENHAB_USER=${uid}:${gid}" openhab.conf +sed -i "/^OPENHAB_USER/c\\\OPENHAB_USER_ID=${uid}" openhab.conf diff --git a/openhab.conf b/openhab.conf index 7414d21..f59766d 100644 --- a/openhab.conf +++ b/openhab.conf @@ -6,9 +6,15 @@ # user configuration # http://docs.openhab.org/installation/docker.html # please add user like UID:GID -OPENHAB_USER=999:998 +OPENHAB_USER_ID=999 # network configuration -OPENHAB_BIND=127.0.0.1 -OPENHAB_PORT=8080 +OPENHAB_HTTP_BIND=127.0.0.1 +OPENHAB_HTTP_PORT=8080 + +OPENHAB_HTTPS_BIND=127.0.0.1 +OPENHAB_HTTPS_PORT=8443 + +OPENHAB_OSGI_BIND=127.0.0.1 +OPENHAB_OSGI_PORT=5555