diff --git a/docker/openemr/flex/auto_configure.php b/docker/openemr/flex/auto_configure.php index 883db52b..d6086e49 100644 --- a/docker/openemr/flex/auto_configure.php +++ b/docker/openemr/flex/auto_configure.php @@ -24,6 +24,8 @@ $installSettings['clone_database'] = 'BLANK'; $installSettings['no_root_db_access'] = 'BLANK'; $installSettings['development_translations'] = 'BLANK'; +$installSettings['encryption_strategy'] = 'cryptogen'; + // Collect parameters(if exist) for installation configuration settings for ($i=1; $i < count($argv); $i++) { if ($argv[$i] == '-f' && isset($argv[$i+1])) { diff --git a/docker/openemr/flex/openemr.sh b/docker/openemr/flex/openemr.sh index ce7f0e0a..6b84d9f1 100644 --- a/docker/openemr/flex/openemr.sh +++ b/docker/openemr/flex/openemr.sh @@ -22,6 +22,9 @@ set -e # shellcheck source=SCRIPTDIR/utilities/devtoolsLibrary.source . /root/devtoolsLibrary.source +# required +: "${PHP_VERSION_ABBR?}" + # defaults : "${DEMO_MODE:=no}" \ "${DEVELOPER_TOOLS:=no}" \ @@ -492,8 +495,8 @@ if [ "${REDIS_SERVER}" != "" ] && echo "redis setup" fi - sed -i "s@session.save_handler = files@session.save_handler = redis@" /etc/php${PHP_VERSION_ABBR}/php.ini - sed -i 's@;session.save_path = "/tmp"@session.save_path = "'"${REDIS_PATH}"'"@"' /etc/php${PHP_VERSION_ABBR}/php.ini + sed -i "s@session.save_handler = files@session.save_handler = redis@" "/etc/php${PHP_VERSION_ABBR}/php.ini" + sed -i 's@;session.save_path = "/tmp"@session.save_path = "'"${REDIS_PATH}"'"@"' "/etc/php${PHP_VERSION_ABBR}/php.ini" # Ensure only configure this one time touch /etc/php-redis-configured fi @@ -503,14 +506,14 @@ if [ "${XDEBUG_IDE_KEY}" != "" ] || sh xdebug.sh #also need to turn off opcache since it can not be turned on with xdebug if [ ! -f /etc/php-opcache-jit-configured ]; then - echo "opcache.enable=0" >> /etc/php${PHP_VERSION_ABBR}/php.ini + echo "opcache.enable=0" >> "/etc/php${PHP_VERSION_ABBR}/php.ini" touch /etc/php-opcache-jit-configured fi else # Configure opcache jit if Xdebug is not being used (note opcache is already on, so just need to add setting(s) to php.ini that are different from the default setting(s)) if [ ! -f /etc/php-opcache-jit-configured ]; then - echo "opcache.jit=tracing" >> /etc/php${PHP_VERSION_ABBR}/php.ini - echo "opcache.jit_buffer_size=100M" >> /etc/php${PHP_VERSION_ABBR}/php.ini + echo "opcache.jit=tracing" >> "/etc/php${PHP_VERSION_ABBR}/php.ini" + echo "opcache.jit_buffer_size=100M" >> "/etc/php${PHP_VERSION_ABBR}/php.ini" touch /etc/php-opcache-jit-configured fi fi diff --git a/docker/openemr/flex/utilities/devtoolsLibrary.source b/docker/openemr/flex/utilities/devtoolsLibrary.source index 2e32dd1f..00c63959 100644 --- a/docker/openemr/flex/utilities/devtoolsLibrary.source +++ b/docker/openemr/flex/utilities/devtoolsLibrary.source @@ -39,6 +39,9 @@ prepareVariables() { if [ -n "${OE_PASS:-}" ]; then CONFIGURATION="${CONFIGURATION} iuserpass=${OE_PASS}" fi + if [ -n "${ENCRYPTION_STRATEGY:-}" ]; then + CONFIGURATION="${CONFIGURATION} encryption_strategy=${ENCRYPTION_STRATEGY}" + fi } setGlobalSettings() {