diff --git a/README.md b/README.md index a9ef729..e9d5971 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,25 @@ If Let's Encrypt is disabled, the Piler is at http://your-piler-domain or at htt > After installation, any changes can be made in piler.conf at any time and the install script can then be run again. +********************************************************************************************************** + + +### Update Guide: + +You can execute the following commands to update the containers. +Here the current yml files are downloaded from Github and the containers are updated if necessary. + +``` +cd /opt/piler-docker +bash update.sh +``` + +* After a successful update, unused container images can be removed from the system with the following command: + +``` +docker system prune +``` + ********************************************************************************************************** ### Using the Piler on the command line @@ -116,6 +135,10 @@ To leave the container on the console you have to execute 2x `exit`. ********************************************************************************************************** ## Changelog +### 0.6.0 (18.12.2022) +* (simatec) Update Installer +* (simatec) update.sh added +* (simatec) downgrade mariadb to v10.5 ### 0.5.3 (17.12.2022) * (simatec) Installer Fix diff --git a/config/piler-default.yml b/config/piler-default.yml index b2b422f..fc902d7 100644 --- a/config/piler-default.yml +++ b/config/piler-default.yml @@ -2,7 +2,7 @@ version: "3" services: mysql: - image: mariadb:10.9.4 + image: mariadb:10.5 container_name: mysql_piler restart: unless-stopped cap_drop: diff --git a/config/piler-ssl.yml b/config/piler-ssl.yml index fdbd687..9ba94af 100644 --- a/config/piler-ssl.yml +++ b/config/piler-ssl.yml @@ -23,7 +23,7 @@ services: environment: - DEFAULT_EMAIL=${LETSENCRYPT_EMAIL} mysql: - image: mariadb:10.9.4 + image: mariadb:10.5 container_name: mysql-piler restart: unless-stopped cap_drop: diff --git a/install-piler.sh b/install-piler.sh index f145c21..6b8f015 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -22,19 +22,52 @@ fi HLINE="==================================================================" +BLA_metro=( 0.2 ' ' '= ' '== ' '=== ' ' ===' ' ==' ' =' ) + +BLA::play_loading_animation_loop() { + while true ; do + for frame in "${BLA_active_loading_animation[@]}" ; do + printf "\r%s" "${frame}" + sleep "${BLA_loading_animation_frame_interval}" + done + done +} + +BLA::start_loading_animation() { + BLA_active_loading_animation=( "${@}" ) + BLA_loading_animation_frame_interval="${BLA_active_loading_animation[0]}" + unset "BLA_active_loading_animation[0]" + tput civis # Hide the terminal cursor + BLA::play_loading_animation_loop & + BLA_loading_animation_pid="${!}" +} + +BLA::stop_loading_animation() { + kill "${BLA_loading_animation_pid}" &> /dev/null + printf "\n" + tput cnorm # Restore the terminal cursor +} + +####################################################################################### +installPth = "/opt/piler-docker" +configPth = "/opt/piler-docker/config" +etcPth = "/var/lib/docker/volumes/piler-docker_piler_etc/_data" + +# Load config . ./piler.conf -if [ ! -f /opt/piler-docker/.env ]; then + +if [ ! -f $installPth/.env ]; then ln -s ./piler.conf .env fi -if [ -f /opt/piler-docker/docker-compose.yml ]; then - rm /opt/piler-docker/docker-compose.yml +if [ -f $installPth/docker-compose.yml ]; then + rm $installPth/docker-compose.yml fi if [ "$USE_LETSENCRYPT" = "yes" ]; then - cp /opt/piler-docker/config/piler-ssl.yml /opt/piler-docker/docker-compose.yml + cp $configPth/piler-ssl.yml $installPth/docker-compose.yml else - cp /opt/piler-docker/config/piler-default.yml /opt/piler-docker/docker-compose.yml + cp $configPth/piler-default.yml $installPth/docker-compose.yml fi while true; do @@ -45,8 +78,9 @@ while true; do * ) echo -e "${red} Please confirm with y or n.";; esac done + # old docker stop -cd /opt/piler-docker +cd $installPth docker-compose down # docker start @@ -56,7 +90,7 @@ echo "${greenBold} start docker-compose for Piler" echo "${greenBold}${HLINE}${normal}" echo -cd /opt/piler-docker +cd $installPth if [ "$USE_LETSENCRYPT" = "yes" ]; then if ! docker network ls | grep -o "nginx-proxy"; then @@ -72,8 +106,11 @@ fi docker-compose up -d -echo "${blue}********* Piler started.... Please wait........" +echo "${blue}********* Piler started... Please wait... *********" + +BLA::start_loading_animation "${BLA_metro[@]}" sleep 20 +BLA::stop_loading_animation echo echo "${blue}${HLINE}" @@ -81,11 +118,11 @@ echo "${blue} backup the File config-site.php" echo "${blue}${HLINE}${normal}" echo -if [ ! -f /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php.bak ]; then - cp /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php.bak +if [ ! -f $etcPth/config-site.php.bak ]; then + cp $etcPth/config-site.php $etcPth/config-site.php.bak else - rm /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php - cp /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php.bak /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php + rm $etcPth/config-site.php + cp $etcPth/config-site.php.bak $etcPth/config-site.php fi echo @@ -94,7 +131,7 @@ echo "${blue} set User settings ..." echo "${blue}${HLINE}${normal}" echo -cat >> /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php <> $etcPth/config-site.php <> /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php <> $etcPth/config-site.php <> /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php <> /var/lib/docker/volumes/piler-docker_piler_etc/_data/piler.conf <> $etcPth/piler.conf <