Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
buanet committed Dec 23, 2021
2 parents 432364f + 182c78d commit 8843ee2
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.0.0
v6.1.0-beta.1
2 changes: 1 addition & 1 deletion .github/workflows/build-debian-image-dev-node16.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 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:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-debian-image-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev)
name: Build debian based image (dev)
name: Build debian image (dev)

on:
workflow_dispatch:
Expand Down
20 changes: 12 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## 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)
* moving docu/ restructuring readme
* v6.0.0-beta1 (2021-10-07)
* upgrading node version to recommended node14
* adding beta-node16 tag for beta testing node16
* updating documentation
* 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 backitup adapter
* reorganizing Dockerfile
Expand All @@ -29,12 +33,12 @@
* adding labels in OCI standard format
* adding packages update on first start
* 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)
* 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
* added expose for default admin ui port (fixes [#172](https://github.com/buanet/ioBroker.docker/issues/172))
* added short form for maintenance script
* v5.2.0-beta (2021-04-02)
* some renaming to optimize automated build
* changes in versioning
Expand All @@ -43,7 +47,7 @@
### v5.1.0 (2020-11-05)
* v5.0.2-beta (2020-07-28)
* added docker tag for majorversion latest
* extend readme.md doku
* extend readme.md docu
* added maintenance script
* added container healthcheck
* fixed configuration procedure and logging for objects and states db setup
Expand Down Expand Up @@ -84,7 +88,7 @@
### v4.1.0 (2020-01-17)
* improved readme.md
* 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"
* v4.0.2-beta (2019-12-10)
* ~~added env for activating redis~~
Expand All @@ -104,13 +108,13 @@
* v3.1.2-beta (2019-09-03)
* using node 10 instead of node 8
* 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.0.3-beta (2019-08-21)
* switching base image from "debian:latest" to "debian:stretch"
* 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
* v3.0.1-beta (2019-05-18)
* ~~switching back to iobroker-daemon for startup~~
Expand Down
1 change: 1 addition & 0 deletions debian/scripts/iobroker_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ then
echo "Registering maintenance script as command..."
echo "alias maintenance=\'/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 ' '
fi
Expand Down
78 changes: 44 additions & 34 deletions debian/scripts/maintenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ display_help() {
echo ''
echo "Usage: maintenance [ COMMAND ] [ OPTION ]"
echo " maint [ COMMAND ] [ OPTION ]"
echo " m [ COMMAND ] [ OPTION ]"
echo ''
echo "COMMANDS"
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 " off > switches mantenance mode OFF and shuts down/ restarts container"
echo " upgrade > will put container to maintenance mode and upgrade iobroker"
echo " off > switches mantenance mode OFF and shuts down or restarts container"
echo " upgrade > will put container to maintenance mode and upgrade ioBroker"
echo " help > shows this help"
echo ''
echo "OPTIONS"
echo "------------------"
echo " -y|--yes > confirms the used command without asking"
echo " -h|--help > shows this help"
echo ''
echo " -h|--help > shows this help"
echo ''
exit 0
}

Expand Down Expand Up @@ -100,11 +101,11 @@ switch_off() {
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "no" ] # maintenance mode ON / autoconfirm = no
then
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
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
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
pkill -u root
echo 'Done.'
Expand All @@ -115,9 +116,9 @@ switch_off() {
elif [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ] && [ "$autoconfirm" == "yes" ] # maintenance mode ON / autoconfirm = yes
then
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 '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
pkill -u root
echo 'Done.'
Expand All @@ -132,31 +133,40 @@ upgrade() {
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 '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.'
read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
echo 'Depending of the restart policy, your container will be stopped or restarted automatically after the upgrade.'

if [ "$autoconfirm" == "no" ]
then
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/ restarted in 5 seconds...'
sleep 5
echo "stopping" > /opt/scripts/.docker_config/.healthcheck
pkill -u root
exit 0
else
exit 0
read -p 'Do you want to continue [yes/no]? ' A
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
then
: # Continue.
else
exit 0
fi
elif [ "$autoconfirm" == "yes" ]
then
echo 'This command was already confirmed by -y or --yes option.'
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
}

########################################
Expand All @@ -169,7 +179,7 @@ for i in "$@"; do
reverse="$i $reverse"
done

# checking the arguments
# checking the arguments
for i in $reverse; do
case $i in
help|-h|--help)
Expand Down Expand Up @@ -218,4 +228,4 @@ for i in $reverse; do
esac
done

exit 0
exit 0
10 changes: 5 additions & 5 deletions src/README_docker_hub_buanet.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<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 Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)
[![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
[![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/r/buanet/iobroker)
[![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)
[![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>
[![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)
[![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).

Expand Down
12 changes: 7 additions & 5 deletions src/README_docker_hub_iobroker.md
Original file line number Diff line number Diff line change
@@ -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 Pulls](https://img.shields.io/docker/pulls/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)
[![Docker Stars](https://img.shields.io/docker/stars/buanet/iobroker?style=flat)](https://hub.docker.com/repository/docker/buanet/iobroker)<br>
[![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/r/buanet/iobroker)
[![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)
[![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>
[![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)

# 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).

Expand Down

0 comments on commit 8843ee2

Please sign in to comment.