Skip to content

Commit

Permalink
Install missing skin via composer on system initialization (#254)
Browse files Browse the repository at this point in the history
Co-authored-by: Björn Bores <[email protected]>
  • Loading branch information
bjalbor and Björn Bores authored Dec 9, 2024
1 parent 04da3b3 commit 8519970
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
15 changes: 15 additions & 0 deletions apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi

if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
# Installing missing skin
echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
composer \
--working-dir=${INSTALLDIR} \
--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
Expand Down
15 changes: 15 additions & 0 deletions fpm-alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi

if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
# Installing missing skin
echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
composer \
--working-dir=${INSTALLDIR} \
--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
Expand Down
15 changes: 15 additions & 0 deletions fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi

if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
# Installing missing skin
echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
composer \
--working-dir=${INSTALLDIR} \
--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
Expand Down
15 changes: 15 additions & 0 deletions templates/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
fi

if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
# Installing missing skin
echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
composer \
--working-dir=${INSTALLDIR} \
--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
Expand Down
1 change: 1 addition & 0 deletions tests/docker-compose.test-apache-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/docker-compose.test-fpm-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
- ROUNDCUBEMAIL_PLUGINS=enigma
- ROUNDCUBEMAIL_SKIN=larry # Install non-default skin

roundcubedb:
image: postgres:alpine
Expand Down

0 comments on commit 8519970

Please sign in to comment.