Merge branch 'beta'

This commit is contained in:
buanet
2021-12-23 20:49:09 +01:00
8 changed files with 72 additions and 55 deletions

View File

@@ -1 +1 @@
v6.0.0 v6.1.0-beta.1

View File

@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev) # Github action to build Docker image from dev branch (tag: dev)
name: Build debian based image (dev-node16) name: Build debian image (dev-node16)
on: on:
workflow_dispatch: workflow_dispatch:

View File

@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev) # Github action to build Docker image from dev branch (tag: dev)
name: Build debian based image (dev) name: Build debian image (dev)
on: on:
workflow_dispatch: workflow_dispatch:

View File

@@ -1,5 +1,9 @@
## Changelog ## Changelog
### v6.1.0-beta.1 (2021-12-20)
* added autoconfirm parameter to upgrade function in maintenance script ([#229 @thost96](https://github.com/buanet/ioBroker.docker/pull/229))
* added alias "m" for maintenance script
### v6.0.0 (2021-12-09) ### v6.0.0 (2021-12-09)
* moving docu/ restructuring readme * moving docu/ restructuring readme
* v6.0.0-beta1 (2021-10-07) * v6.0.0-beta1 (2021-10-07)
@@ -7,7 +11,7 @@
* adding beta-node16 tag for beta testing node16 * adding beta-node16 tag for beta testing node16
* updating documentation * updating documentation
* v5.3.0-beta1 (2021-10-07) * v5.3.0-beta1 (2021-10-07)
* adding check (installed) PACKAGES on startup (#201) * adding check (installed) PACKAGES on startup (fixes [#201](https://github.com/buanet/ioBroker.docker/issues/201))
* adding packages for discovery adapter * adding packages for discovery adapter
* adding packages for backitup adapter * adding packages for backitup adapter
* reorganizing Dockerfile * reorganizing Dockerfile
@@ -29,12 +33,12 @@
* adding labels in OCI standard format * adding labels in OCI standard format
* adding packages update on first start * adding packages update on first start
* adding file for docker detection by ioBroker adapters * adding file for docker detection by ioBroker adapters
* adding best practice for states db migation in readme * adding best practice for states db migration in readme
* removing couchdb option for states db (no longer supported) * removing couchdb option for states db (no longer supported)
* v5.2.0-beta1 (2021-05-04) * v5.2.0-beta1 (2021-05-04)
* added upgrade parameter to maintenance script * added upgrade parameter to maintenance script
* added expose for default admin ui port (#172) * added expose for default admin ui port (fixes [#172](https://github.com/buanet/ioBroker.docker/issues/172))
* added shortform for maintenance script * added short form for maintenance script
* v5.2.0-beta (2021-04-02) * v5.2.0-beta (2021-04-02)
* some renaming to optimize automated build * some renaming to optimize automated build
* changes in versioning * changes in versioning
@@ -43,7 +47,7 @@
### v5.1.0 (2020-11-05) ### v5.1.0 (2020-11-05)
* v5.0.2-beta (2020-07-28) * v5.0.2-beta (2020-07-28)
* added docker tag for majorversion latest * added docker tag for majorversion latest
* extend readme.md doku * extend readme.md docu
* added maintenance script * added maintenance script
* added container healthcheck * added container healthcheck
* fixed configuration procedure and logging for objects and states db setup * fixed configuration procedure and logging for objects and states db setup
@@ -84,7 +88,7 @@
### v4.1.0 (2020-01-17) ### v4.1.0 (2020-01-17)
* improved readme.md * improved readme.md
* v4.0.3-beta (2020-01-06) * v4.0.3-beta (2020-01-06)
* added support to restore backup on startup * added support to restore backup on startup ([#56 @duffbeer2000](https://github.com/buanet/ioBroker.docker/pull/56))
* small fixes according to "docker best practices" * small fixes according to "docker best practices"
* v4.0.2-beta (2019-12-10) * v4.0.2-beta (2019-12-10)
* ~~added env for activating redis~~ * ~~added env for activating redis~~
@@ -104,13 +108,13 @@
* v3.1.2-beta (2019-09-03) * v3.1.2-beta (2019-09-03)
* using node 10 instead of node 8 * using node 10 instead of node 8
* v3.1.1-beta (2019-09-02) * v3.1.1-beta (2019-09-02)
* adding env for setting uid/ gid for iobroker-user * adding env for setting uid/ gid for iobroker-user ([#33 @mplogas](https://github.com/buanet/ioBroker.docker/pull/33))
### v3.1.0 (2019-08-21) ### v3.1.0 (2019-08-21)
* v3.0.3-beta (2019-08-21) * v3.0.3-beta (2019-08-21)
* switching base image from "debian:latest" to "debian:stretch" * switching base image from "debian:latest" to "debian:stretch"
* v3.0.2-beta (2019-06-13) * v3.0.2-beta (2019-06-13)
* using gosu instead of sudo * using gosu instead of sudo ([#26 @SchumyHao](https://github.com/buanet/ioBroker.docker/pull/26))
* changing output of ioBroker logging * changing output of ioBroker logging
* v3.0.1-beta (2019-05-18) * v3.0.1-beta (2019-05-18)
* ~~switching back to iobroker-daemon for startup~~ * ~~switching back to iobroker-daemon for startup~~

View File

@@ -86,6 +86,7 @@ then
echo "Registering maintenance script as command..." echo "Registering maintenance script as command..."
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc echo "alias maint=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "alias m=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
echo "Done." echo "Done."
echo ' ' echo ' '
fi fi

View File

@@ -17,20 +17,21 @@ display_help() {
echo '' echo ''
echo "Usage: maintenance [ COMMAND ] [ OPTION ]" echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
echo " maint [ COMMAND ] [ OPTION ]" echo " maint [ COMMAND ] [ OPTION ]"
echo " m [ COMMAND ] [ OPTION ]"
echo '' echo ''
echo "COMMANDS" echo "COMMANDS"
echo "------------------" echo "------------------"
echo " status > gives the current state of maintenance mode" echo " status > reports the current state of maintenance mode"
echo " on > switches mantenance mode ON" echo " on > switches mantenance mode ON"
echo " off > switches mantenance mode OFF and shuts down/ restarts container" echo " off > switches mantenance mode OFF and shuts down or restarts container"
echo " upgrade > will put container to maintenance mode and upgrade iobroker" echo " upgrade > will put container to maintenance mode and upgrade ioBroker"
echo " help > shows this help" echo " help > shows this help"
echo '' echo ''
echo "OPTIONS" echo "OPTIONS"
echo "------------------" echo "------------------"
echo " -y|--yes > confirms the used command without asking" echo " -y|--yes > confirms the used command without asking"
echo " -h|--help > shows this help" echo " -h|--help > shows this help"
echo '' echo ''
exit 0 exit 0
} }
@@ -100,11 +101,11 @@ switch_off() {
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
then then
echo 'You are now going to deactivate maintenance mode for this container.' echo 'You are now going to deactivate maintenance mode for this container.'
echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.' echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
read -p 'Do you want to continue [yes/no]? ' A read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ] if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
then then
echo 'Deactivating maintenance mode and forcing container to stop/ restart...' echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root pkill -u root
echo 'Done.' echo 'Done.'
@@ -115,9 +116,9 @@ switch_off() {
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
then then
echo 'You are now going to deactivate maintenance mode for this container.' echo 'You are now going to deactivate maintenance mode for this container.'
echo 'Depending on the restart policy, your container will be stopped/ restarted immediately.' echo 'Depending on the restart policy, your container will be stopped or restarted immediately.'
echo 'This command was already confirmed by -y or --yes option.' echo 'This command was already confirmed by -y or --yes option.'
echo 'Deactivating maintenance mode and forcing container to stop/ restart...' echo 'Deactivating maintenance mode and forcing container to stop or restart...'
echo "stopping" > /opt/scripts/.docker_config/.healthcheck echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root pkill -u root
echo 'Done.' echo 'Done.'
@@ -132,31 +133,40 @@ upgrade() {
echo 'You are now going to upgrade your js-controller.' echo 'You are now going to upgrade your js-controller.'
echo 'As this will change data in /opt/iobroker, make sure you have a backup!' echo 'As this will change data in /opt/iobroker, make sure you have a backup!'
echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.' echo 'During the upgrade process the container will automatically switch into maintenance mode and stop ioBroker.'
echo 'Depending of the restart policy, you container will be stoped/ restarted automatically after the upgrade.' echo 'Depending of the restart policy, your container will be stopped or restarted automatically after the upgrade.'
read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ] if [ "$autoconfirm" == "no" ]
then then
echo 'Activating maintenance mode...' read -p 'Do you want to continue [yes/no]? ' A
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
sleep 1 then
echo 'Done.' : # Continue.
echo 'Stopping ioBroker...' else
pkill -u iobroker exit 0
sleep 1 fi
echo 'Done.' elif [ "$autoconfirm" == "yes" ]
echo 'Upgrading js-controller...' then
iobroker update echo 'This command was already confirmed by -y or --yes option.'
iobroker upgrade self
sleep 1
echo 'Done.'
echo 'Container will be stopped/ restarted in 5 seconds...'
sleep 5
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
exit 0
else
exit 0
fi fi
echo 'Activating maintenance mode...'
echo "maintenance" > /opt/scripts/.docker_config/.healthcheck
sleep 1
echo 'Done.'
echo 'Stopping ioBroker...'
pkill -u iobroker
sleep 1
echo 'Done.'
echo 'Upgrading js-controller...'
iobroker update
iobroker upgrade self
sleep 1
echo 'Done.'
echo 'Container will be stopped or restarted in 5 seconds...'
sleep 5
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
exit 0
} }
######################################## ########################################
@@ -169,7 +179,7 @@ for i in "$@"; do
reverse="$i $reverse" reverse="$i $reverse"
done done
# checking the arguments # checking the arguments
for i in $reverse; do for i in $reverse; do
case $i in case $i in
help|-h|--help) help|-h|--help)
@@ -218,4 +228,4 @@ for i in $reverse; do
esac esac
done done
exit 0 exit 0

View File

@@ -1,8 +1,8 @@
<img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo"> <img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo">
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/buanet/iobroker/latest?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker) [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/buanet/iobroker/latest?style=flat)](https://hub.docker.com/r/buanet/iobroker)
[![Docker Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker) [![Docker Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/r/buanet/iobroker)
[![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)<br> [![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/r/buanet/iobroker)<br>
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/buanet/ioBroker.docker/Build%20debian%20based%20image%20\(latest\))](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/buanet/ioBroker.docker/Build%20debian%20based%20image%20\(latest\))](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[![Release](https://img.shields.io/github/v/release/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/releases) [![Release](https://img.shields.io/github/v/release/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/releases)
[![Github Issues](https://img.shields.io/github/issues/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/issues)<br> [![Github Issues](https://img.shields.io/github/issues/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/issues)<br>
@@ -10,7 +10,7 @@
[![License](https://img.shields.io/github/license/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md) [![License](https://img.shields.io/github/license/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
[![Donate](https://img.shields.io/badge/donate-paypal-blue?style=flat)](https://paypal.me/buanet) [![Donate](https://img.shields.io/badge/donate-paypal-blue?style=flat)](https://paypal.me/buanet)
# Important Note # Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance). New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).

View File

@@ -1,15 +1,17 @@
<img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo"> ###### [iobroker/iobroker](https://hub.docker.com/r/iobroker/iobroker) is an alias for [buanet/iobroker](https://hub.docker.com/r/buanet/iobroker)
<img src="https://github.com/buanet/ioBroker.docker/raw/main/src/img/iobroker_logo.png" width="600" title="ioBroker Logo">
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/buanet/iobroker/latest?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker) [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/buanet/iobroker/latest?style=flat)](https://hub.docker.com/r/buanet/iobroker)
[![Docker Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker) [![Docker Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/r/buanet/iobroker)
[![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)<br> [![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/r/buanet/iobroker)<br>
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/buanet/ioBroker.docker/Build%20debian%20based%20image%20\(latest\))](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/buanet/ioBroker.docker/Build%20debian%20based%20image%20\(latest\))](https://github.com/buanet/ioBroker.docker/actions/workflows/build-debian-image-main.yml)
[![Release](https://img.shields.io/github/v/release/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/releases) [![Release](https://img.shields.io/github/v/release/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/releases)
[![Github Issues](https://img.shields.io/github/issues/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/issues)<br> [![Github Issues](https://img.shields.io/github/issues/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/issues)<br>
[![Source](https://img.shields.io/badge/source-github-blue?style=flat)](https://github.com/buanet/ioBroker.docker) [![Source](https://img.shields.io/badge/source-github-blue?style=flat)](https://github.com/buanet/ioBroker.docker)
[![License](https://img.shields.io/github/license/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md) [![License](https://img.shields.io/github/license/buanet/ioBroker.docker?style=flat)](https://github.com/buanet/ioBroker.docker/blob/master/LICENSE.md)
# Important Note # Important note
New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance). New major image versions (e.g. v4, v5, v6) always come with a new major version of node! This might lead to problems when you update your ioBroker container by simply recreating it from the new major version image! To avoid having trouble with recompiling adapters, it is recommended to upgrade your container manually with backup and restore procedure. For more details please see the maintenance part of the new [ioBroker Docker image docs](https://docs.buanet.de/iobroker-docker-image/docs/#maintenance).