diff --git a/.VERSION b/.VERSION index daf04d0..b3db390 100644 --- a/.VERSION +++ b/.VERSION @@ -1,2 +1,2 @@ -v5.2.0_beta +v5.2.0_beta1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf351b..74c3336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,139 +1,143 @@ ## Changelog -### v5.2.1beta (2021-05-04) -* added upgrade parameter to maintenance script -* added expose for default admin ui port (#172) -* added shortform for maintenance script -* v5.2.0beta (2021-04-02) +### * v5.2.0 beta2 (2021-06-26) +* adding file for docker detection by ioBroker adapters +* adding best practice for states db migation +* removing couchdb option for states db (no longer supported) +* v5.2.0 beta1 (2021-05-04) + * added upgrade parameter to maintenance script + * added expose for default admin ui port (#172) + * added shortform for maintenance script +* v5.2.0 beta (2021-04-02) * some renaming to optimize automated build * changes in versioning * delete travis for automated build ### v5.1.0 (2020-11-05) -* v5.0.2beta (2020-07-28) +* v5.0.2 beta (2020-07-28) * added docker tag for majorversion latest * extend readme.md doku * added maintenance script * added container healthcheck * fixed configuration procedure and logging for objects and states db setup -* v5.0.1beta (2020-07-01) +* v5.0.1 beta (2020-07-01) * fixing backup detection in startup script * fixing permission issue on iobroker restored * extended Logging * optimize multihost support ### v5.0.0 (2020-06-29) -* v4.2.4beta (2020-06-23) +* v4.2.4 beta (2020-06-23) * added graceful shutdown * small fix for GID/UID handling * adding new ENV "IOB_MULTIHOST" for multihost support * small syntax fixes in iobroker_startup.sh -* v4.2.3beta (2020-06-05) +* v4.2.3 beta (2020-06-05) * ~~updating js-controller to not stable version 3.1.5 to fix renaming issue~~ (is stable now) -* v4.2.2beta (2020-06-03) +* v4.2.2 beta (2020-06-03) * ~~workaround for renaming issues on startup~~ (fixed in js-controller) -* v4.2.1beta (2020-05-10) +* v4.2.1 beta (2020-05-10) * using node 12 instead of 10 * updated documentation in readme.md ### v4.2.0 (2020-04-14) -* v4.1.4beta (2020-04-07) +* v4.1.4 beta (2020-04-07) * switching base image to buster * optimizing installation of packages defined by ENV "PACKAGES" -* v4.1.3beta (2020-02-08) +* v4.1.3 beta (2020-02-08) * renamed ENV for adminport (new "IOB_ADMINPORT)") * added new ENVs for "iobroker setup custom" (replacing "REDIS") * enhancements in startup script logging -* v4.1.2beta (2020-02-02) +* v4.1.2 beta (2020-02-02) * added feature for running user defined scripts on startup * small fix for permissions issues on some systems -* v4.1.1beta (2020-01-17) +* v4.1.1 beta (2020-01-17) * updated openzwave to version 1.6.1007 ### v4.1.0 (2020-01-17) * improved readme.md -* v4.0.3beta (2020-01-06) +* v4.0.3 beta (2020-01-06) * added support to restore backup on startup * small fixes according to "docker best practices" -* v4.0.2beta (2019-12-10) +* v4.0.2 beta (2019-12-10) * ~~added env for activating redis~~ * enhancements in startup script and docker file -* v4.0.1beta (2019-11-25) +* v4.0.1 beta (2019-11-25) * added env for iobroker admin port * added env for usb-devices (setting permissions) * updateing prerequisites for iobroker installation * some small code fixes ### v4.0.0 (2019-10-25) -* v3.1.4beta (2019-10-23) +* v3.1.4 beta (2019-10-23) * added env for zwave support -* v3.1.3beta (2019-10-17) +* v3.1.3 beta (2019-10-17) * enhanced logging of startup-script * multi arch support (amd64, aarch64, armv7hf) -* v3.1.2beta (2019-09-03) +* v3.1.2 beta (2019-09-03) * using node 10 instead of node 8 -* v3.1.1beta (2019-09-02) +* v3.1.1 beta (2019-09-02) * adding env for setting uid/ gid for iobroker-user ### v3.1.0 (2019-08-21) -* v3.0.3beta (2019-08-21) +* v3.0.3 beta (2019-08-21) * switching base image from "debian:latest" to "debian:stretch" -* v3.0.2beta (2019-06-13) +* v3.0.2 beta (2019-06-13) * using gosu instead of sudo * changing output of ioBroker logging -* v3.0.1beta (2019-05-18) +* v3.0.1 beta (2019-05-18) * ~~switching back to iobroker-daemon for startup~~ ### v3.0.0 (2019-05-09) -* v2.0.6beta (2019-04-14) +* v2.0.6 beta (2019-04-14) * added some additional logging * fixing some issues for language env * added permission fixing on first start -* v2.0.5beta (2019-02-09) +* v2.0.5 beta (2019-02-09) * added ENV to docker file * added EXPOSE for admin * final testing -* v2.0.4beta (2019-01-28) +* v2.0.4 beta (2019-01-28) * added support for env variables "avahi" and "packages" * moving avahi-daemon installation into avahi startup script * added script for installing optional packages * optimizing logging output -* v2.0.3beta (2019-01-24) +* v2.0.3 beta (2019-01-24) * added support for running ioBroker under iobroker user * optimizing logging output * optimizing scripts -* v2.0.2beta (2019-01-23) +* v2.0.2 beta (2019-01-23) * optimizing and rearranged docker file * changes for new ioBroker install script * added restoring for empty mounted /opt/iobroker folder * some more small fixes -* v2.0.1beta (2019-01-07) +* v2.0.1 beta (2019-01-07) * some changes for supporting other docker-environments than synology ds ### v2.0.0 (2018-12-05) -* v1.2.2beta (2018-12-05) +* v1.2.2 beta (2018-12-05) * using node8 instead of node6 * changes for new iobroker setup -* v1.2.1beta (2018-09-12) +* v1.2.1 beta (2018-09-12) * added support for firetv-adapter ### v1.2.0 (2018-08-21) -* v1.1.3beta (2018-08-21) +* v1.1.3 beta (2018-08-21) * ~~added ffmpeg-package for yahka to support webcams~~ -* v1.1.2beta (2018-04-04) +* v1.1.2 beta (2018-04-04) * added ENV for timezone issue -* v1.1.1beta (2018-03-29) +* v1.1.1 beta (2018-03-29) * added wget package * updated readme.md ### v1.1.0 (2017-12-10) -* v1.0.2beta (2017-12-10) +* v1.0.2 beta (2017-12-10) * changed startup call to fix restart issue * fixed avahi startup issue * fixed hostname issue * added z-wave support * added logging to /opt/scripts/docker_iobroker_log.txt -* v1.0.1beta (2017-08-25) +* v1.0.1 beta (2017-08-25) * fixed locales issue ### v1.0.0 (2017-08-22) diff --git a/README.md b/README.md index 2583f94..3069c29 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ You do not have to declare every single variable when setting up your container. |IOB_MULTIHOST|[not set]|Sets ioBroker instance as "master" or "slave" for multihost support (needs additional config for objectsdb and statesdb!)| |IOB_OBJECTSDB_HOST|127.0.0.1|Sets host for ioBroker objects db| |IOB_OBJECTSDB_PORT|9001|Sets port for ioBroker objects db| -|IOB_OBJECTSDB_TYPE|file|Sets type of ioBroker objects db, cloud be "file", "redis" or "couch"
(at the moment redis as objects db is [not supported by ioBroker](https://github.com/ioBroker/ioBroker#databases))| +|IOB_OBJECTSDB_TYPE|file|Sets type of ioBroker objects db, cloud be "file" or "redis"
(at the moment redis as objects db is [not officially supported by ioBroker](https://github.com/ioBroker/ioBroker#databases))| |IOB_STATESDB_HOST|127.0.0.1|Sets host for ioBroker states db| |IOB_STATESDB_PORT|9000|Sets port for ioBroker states db| |IOB_STATESDB_TYPE|file|Sets type of ioBroker states db, could be "file" or "redis"| @@ -169,8 +169,16 @@ If you want to upgrade your ioBroker container to a new major version (e.g. from After this steps the startup script inside the container will automatically detect and restore your backup to a new ioBroker instance. When iobroker is started after the restore it will install your adapters to the new ioBroker instance by itself. This might take some time but will give you the best and cleanest results... +### Switching states db from file to redis + +If you want to switch states db from file to redis on a n existing installation you might want to keep all your actual states. As simply setting the needed ENVs won't migrate your existing states into the redis db it is best practice to first run "iobroker setup custom" inside your container before adding the ENVs. This will give you the choice to migrate your states. + ## Miscellaneous +### Detecting this Docker image by ioBroker (feature for adapter developers) + +For adapter developers it is now possible to easily detect if ioBroker is running inside the official docker container. Please simply check if the file `/opt/scripts/.docker_config/.thisisdocker"` exists. The content of the file will tell the image version. + ### Beta testing If you want to get the newest features and changes feel free to use/ test the beta version of the Docker image. You can find the readme.md file for beta versions [here](https://github.com/buanet/ioBroker.docker/blob/beta/README.md). Please make sure to read the changelog before testing beta versions. diff --git a/amd64/scripts/iobroker_startup.sh b/amd64/scripts/iobroker_startup.sh index 67c1ffb..9cbf0cf 100644 --- a/amd64/scripts/iobroker_startup.sh +++ b/amd64/scripts/iobroker_startup.sh @@ -71,6 +71,9 @@ echo "----- Step 1 of 5: Preparing container -----" echo "$(printf -- '-%.0s' {1..60})" echo ' ' +# Adding ckeck file for easy docker detection by ioBroker +echo "$VERSION" > /opt/scripts/.docker_config/.thisisdocker + # Installing additional packages and setting uid/gid if [ "$packages" != "" ] || [ $(cat /etc/group | grep 'iobroker:' | cut -d':' -f3) != $setgid ] || [ $(cat /etc/passwd | grep 'iobroker:' | cut -d':' -f3) != $setuid ] || [ -f /opt/.firstrun ] then