diff --git a/README.md b/README.md index 89232cf..84c3910 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ [![Docker Multiplatform Build ci](https://github.com/pifou25/docker-jeedom/actions/workflows/buildx-platform.yml/badge.svg)](https://github.com/pifou25/docker-jeedom/actions/workflows/buildx-platform.yml) ![Docker Pulls](https://img.shields.io/docker/pulls/pifou25/jeedom) ![GitHub forks](https://img.shields.io/github/forks/pifou25/docker-jeedom) - -[![Try in PWD](https://img.shields.io/badge/PWD-Play%20With%20Docker-blue?logo=docker)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/pifou25/docker-jeedom/master/docker-compose.yml) Try in "Play-With-Docker" require a Docker account. +[![Try in PWD](https://img.shields.io/badge/try-it_now!-blue?logo=docker&color=lemon)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/pifou25/docker-jeedom/master/docker-compose.yml) # Jeedom - *Innovative Home Automation*

@@ -33,8 +32,9 @@ complete installation. ### Meaning of any keywords -* `Full` -* `Light` +* `Full` = standalone +* `Light` = without extra daemon +* bullseye, buster, or bookworm is the Debian base version. The current default is `bullseye` * Jeedom Version `stable` (current = v4.3 = latest) or `beta` (future v4.4), see jeedom Git branches. * `debug` when the image also contains XDebug packages for PHP debug @@ -61,9 +61,15 @@ You can run the standalone `latest` container as-it : ``` docker run --name jeedom -d -v "$PWD/jeedom/":/var/www/html pifou25/jeedom ``` - ( --name = the container name, -d = detached mode, -v = mount the volume source:destination) +## run a new container with an existing backup + +The init sequence may track and restore a previous Jeedom backup: +``` +docker run --name jeedom -d -v "$PWD/backup":/var/www/html/backup pifou25/jeedom +``` + ## Docker Compose for Debug and specific services The `docker-compose.yml` is an example to run several services (mariaDB, scheduler, ...) and the `light` diff --git a/build/README.md b/build/README.md index ed3f3c2..52332b0 100644 --- a/build/README.md +++ b/build/README.md @@ -6,7 +6,10 @@ After cloning the git repository, one may build the desired Docker image using t cd build docker build --target full_xdebug --build-arg JEEDOM_VERSION=V4-stable --tag jeedom:debug . ``` -* Available targets are: light_jeedom, light_xdebug, full_jeedom, full_xdebug +* Available targets are: light_jeedom, full_jeedom +* $DEBIAN is buster, bullseye or bookworm +* for bookworm: add $PHP with minimal version 8. $PHP=7.3 is the default value for previous Debian versions +* $XDEBUG = true / false * $JEEDOM_VERSION is beta or V4-stable (default) (or master for the unsupported Jeedom v3) ## Github Workflow diff --git a/build/init.sh b/build/init.sh index 505cf01..a458968 100644 --- a/build/init.sh +++ b/build/init.sh @@ -92,10 +92,11 @@ if [ ! -f "${WEBSERVER_HOME}/core/config/common.config.php" ]; then exit 1 fi - if [ -d "/tmp/backup" ] && [ "$(ls -A /tmp/backup)" ]; then - log_info "found a backup, try to restore..." - cp /tmp/backup/* ${WEBSERVER_HOME}/backup - php ${WEBSERVER_HOME}/install/restore.php + # find latest backup and try to restore at the first container launch + if [ -d "${WEBSERVER_HOME}/backup" ] && [ "$(ls -A ${WEBSERVER_HOME}/backup)" ]; then + filename=$(ls -Art ${WEBSERVER_HOME}/backup) + log_info "found a backup, try to restore: ${filename}" + php ${WEBSERVER_HOME}/install/restore.php backup=${filename} fi log_info " ___ successfull new installation ! ___" fi diff --git a/build/standalone/init.sh b/build/standalone/init.sh index 5c3fd6d..a4db286 100644 --- a/build/standalone/init.sh +++ b/build/standalone/init.sh @@ -116,10 +116,11 @@ if [ ! -f "${WEBSERVER_HOME}/core/config/common.config.php" ]; then log_warn "vérification de jeedom" php ${WEBSERVER_HOME}/sick.php - if [ -d "/tmp/backup" ] && [ "$(ls -A /tmp/backup)" ]; then - log_info "found a backup, try to restore..." - cp /tmp/backup/* ${WEBSERVER_HOME}/backup - php ${WEBSERVER_HOME}/install/restore.php + # find latest backup and try to restore at the first container launch + if [ -d "${WEBSERVER_HOME}/backup" ] && [ "$(ls -A ${WEBSERVER_HOME}/backup)" ]; then + filename=$(ls -Art ${WEBSERVER_HOME}/backup) + log_info "found a backup, try to restore: ${filename}" + php ${WEBSERVER_HOME}/install/restore.php backup=${filename} fi log_info " ___ successfull new installation ! ___"