From 14c252f131729c28a60e67aa055cd4635a267384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bores?= Date: Fri, 7 Jun 2024 13:01:20 +0200 Subject: [PATCH 1/3] Install missing skin via composer. Otherwise you will get an error (also see #243) --- apache/docker-entrypoint.sh | 14 ++++++++++++++ fpm-alpine/docker-entrypoint.sh | 14 ++++++++++++++ fpm/docker-entrypoint.sh | 14 ++++++++++++++ templates/docker-entrypoint.sh | 14 ++++++++++++++ 4 files changed, 56 insertions(+) diff --git a/apache/docker-entrypoint.sh b/apache/docker-entrypoint.sh index 5aaba562a..f348fd75c 100755 --- a/apache/docker-entrypoint.sh +++ b/apache/docker-entrypoint.sh @@ -94,6 +94,20 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then ${ROUNDCUBEMAIL_PLUGINS_SH}; fi + if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then + # Installing missing skin + composer \ + --working-dir=/usr/src/roundcubemail/ \ + --prefer-dist \ + --prefer-stable \ + --update-no-dev \ + --no-interaction \ + --optimize-autoloader \ + require \ + -- \ + roundcube/${ROUNDCUBEMAIL_SKIN}; + fi + if [ ! -e config/config.inc.php ]; then GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24` touch config/config.inc.php diff --git a/fpm-alpine/docker-entrypoint.sh b/fpm-alpine/docker-entrypoint.sh index 5aaba562a..f348fd75c 100755 --- a/fpm-alpine/docker-entrypoint.sh +++ b/fpm-alpine/docker-entrypoint.sh @@ -94,6 +94,20 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then ${ROUNDCUBEMAIL_PLUGINS_SH}; fi + if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then + # Installing missing skin + composer \ + --working-dir=/usr/src/roundcubemail/ \ + --prefer-dist \ + --prefer-stable \ + --update-no-dev \ + --no-interaction \ + --optimize-autoloader \ + require \ + -- \ + roundcube/${ROUNDCUBEMAIL_SKIN}; + fi + if [ ! -e config/config.inc.php ]; then GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24` touch config/config.inc.php diff --git a/fpm/docker-entrypoint.sh b/fpm/docker-entrypoint.sh index 5aaba562a..f348fd75c 100755 --- a/fpm/docker-entrypoint.sh +++ b/fpm/docker-entrypoint.sh @@ -94,6 +94,20 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then ${ROUNDCUBEMAIL_PLUGINS_SH}; fi + if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then + # Installing missing skin + composer \ + --working-dir=/usr/src/roundcubemail/ \ + --prefer-dist \ + --prefer-stable \ + --update-no-dev \ + --no-interaction \ + --optimize-autoloader \ + require \ + -- \ + roundcube/${ROUNDCUBEMAIL_SKIN}; + fi + if [ ! -e config/config.inc.php ]; then GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24` touch config/config.inc.php diff --git a/templates/docker-entrypoint.sh b/templates/docker-entrypoint.sh index 5aaba562a..f348fd75c 100644 --- a/templates/docker-entrypoint.sh +++ b/templates/docker-entrypoint.sh @@ -94,6 +94,20 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then ${ROUNDCUBEMAIL_PLUGINS_SH}; fi + if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then + # Installing missing skin + composer \ + --working-dir=/usr/src/roundcubemail/ \ + --prefer-dist \ + --prefer-stable \ + --update-no-dev \ + --no-interaction \ + --optimize-autoloader \ + require \ + -- \ + roundcube/${ROUNDCUBEMAIL_SKIN}; + fi + if [ ! -e config/config.inc.php ]; then GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24` touch config/config.inc.php From 8c5b1eb6fe7f96bbf11910c7c850b138f84a104f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bores?= Date: Fri, 29 Nov 2024 11:31:48 +0100 Subject: [PATCH 2/3] Added echo to be consitent with other sections --- apache/docker-entrypoint.sh | 1 + fpm-alpine/docker-entrypoint.sh | 1 + fpm/docker-entrypoint.sh | 1 + templates/docker-entrypoint.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/apache/docker-entrypoint.sh b/apache/docker-entrypoint.sh index f348fd75c..5ec090e0c 100755 --- a/apache/docker-entrypoint.sh +++ b/apache/docker-entrypoint.sh @@ -96,6 +96,7 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then # Installing missing skin + echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}" composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ diff --git a/fpm-alpine/docker-entrypoint.sh b/fpm-alpine/docker-entrypoint.sh index f348fd75c..5ec090e0c 100755 --- a/fpm-alpine/docker-entrypoint.sh +++ b/fpm-alpine/docker-entrypoint.sh @@ -96,6 +96,7 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then # Installing missing skin + echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}" composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ diff --git a/fpm/docker-entrypoint.sh b/fpm/docker-entrypoint.sh index f348fd75c..5ec090e0c 100755 --- a/fpm/docker-entrypoint.sh +++ b/fpm/docker-entrypoint.sh @@ -96,6 +96,7 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then # Installing missing skin + echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}" composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ diff --git a/templates/docker-entrypoint.sh b/templates/docker-entrypoint.sh index f348fd75c..5ec090e0c 100644 --- a/templates/docker-entrypoint.sh +++ b/templates/docker-entrypoint.sh @@ -96,6 +96,7 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then # Installing missing skin + echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}" composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ From 03f351b6fd6a50cac377b8a6572aa5980b4b6569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bores?= Date: Fri, 29 Nov 2024 11:32:25 +0100 Subject: [PATCH 3/3] Added installation of non-default skin to test --- tests/docker-compose.test-apache-postgres.yml | 1 + tests/docker-compose.test-fpm-postgres.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/docker-compose.test-apache-postgres.yml b/tests/docker-compose.test-apache-postgres.yml index 4612b25a0..578d931ea 100644 --- a/tests/docker-compose.test-apache-postgres.yml +++ b/tests/docker-compose.test-apache-postgres.yml @@ -23,6 +23,7 @@ services: - ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name - ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name - ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name + - ROUNDCUBEMAIL_SKIN=larry # Install non-default skin roundcubedb: image: postgres:alpine diff --git a/tests/docker-compose.test-fpm-postgres.yml b/tests/docker-compose.test-fpm-postgres.yml index 28830bfc5..fe856b2af 100644 --- a/tests/docker-compose.test-fpm-postgres.yml +++ b/tests/docker-compose.test-fpm-postgres.yml @@ -27,6 +27,7 @@ services: - ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name - ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name - ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name + - ROUNDCUBEMAIL_SKIN=larry # Install non-default skin roundcubedb: image: postgres:alpine