diff --git a/10/mysql-tomcat/xwiki/docker-entrypoint.sh b/10/mysql-tomcat/xwiki/docker-entrypoint.sh index 4e7f232daeac593eba3904bc733c853f35d3db62..e72e445faf353bff06ab26add49024eaf87cb241 100755 --- a/10/mysql-tomcat/xwiki/docker-entrypoint.sh +++ b/10/mysql-tomcat/xwiki/docker-entrypoint.sh @@ -121,12 +121,6 @@ function configure() { safesed "replacecontainer" $DB_HOST /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml safesed "replacedatabase" $DB_DATABASE /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml - echo ' Using filesystem-based attachments...' - xwiki_set_cfg 'xwiki.store.attachment.hint' 'file' - xwiki_set_cfg 'xwiki.store.attachment.versioning.hint' 'file' - xwiki_set_cfg 'xwiki.store.attachment.recyclebin.content.hint' 'file' - echo ' Using filesystem-based deleted documents...' - xwiki_set_cfg 'xwiki.store.recyclebin.content.hint' 'file' echo ' Generating authentication validation and encryption keys...' xwiki_set_cfg 'xwiki.authentication.validationKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" xwiki_set_cfg 'xwiki.authentication.encryptionKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" diff --git a/10/postgres-tomcat/xwiki/docker-entrypoint.sh b/10/postgres-tomcat/xwiki/docker-entrypoint.sh index 4e7f232daeac593eba3904bc733c853f35d3db62..e72e445faf353bff06ab26add49024eaf87cb241 100755 --- a/10/postgres-tomcat/xwiki/docker-entrypoint.sh +++ b/10/postgres-tomcat/xwiki/docker-entrypoint.sh @@ -121,12 +121,6 @@ function configure() { safesed "replacecontainer" $DB_HOST /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml safesed "replacedatabase" $DB_DATABASE /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml - echo ' Using filesystem-based attachments...' - xwiki_set_cfg 'xwiki.store.attachment.hint' 'file' - xwiki_set_cfg 'xwiki.store.attachment.versioning.hint' 'file' - xwiki_set_cfg 'xwiki.store.attachment.recyclebin.content.hint' 'file' - echo ' Using filesystem-based deleted documents...' - xwiki_set_cfg 'xwiki.store.recyclebin.content.hint' 'file' echo ' Generating authentication validation and encryption keys...' xwiki_set_cfg 'xwiki.authentication.validationKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" xwiki_set_cfg 'xwiki.authentication.encryptionKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" diff --git a/9/mysql-tomcat/xwiki/docker-entrypoint.sh b/9/mysql-tomcat/xwiki/docker-entrypoint.sh index 4e7f232daeac593eba3904bc733c853f35d3db62..0a7e24fb31ca2b4dedd1e4c8c4b9f28062f41583 100755 --- a/9/mysql-tomcat/xwiki/docker-entrypoint.sh +++ b/9/mysql-tomcat/xwiki/docker-entrypoint.sh @@ -127,6 +127,7 @@ function configure() { xwiki_set_cfg 'xwiki.store.attachment.recyclebin.content.hint' 'file' echo ' Using filesystem-based deleted documents...' xwiki_set_cfg 'xwiki.store.recyclebin.content.hint' 'file' + echo ' Generating authentication validation and encryption keys...' xwiki_set_cfg 'xwiki.authentication.validationKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" xwiki_set_cfg 'xwiki.authentication.encryptionKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" diff --git a/9/postgres-tomcat/xwiki/docker-entrypoint.sh b/9/postgres-tomcat/xwiki/docker-entrypoint.sh index 4e7f232daeac593eba3904bc733c853f35d3db62..0a7e24fb31ca2b4dedd1e4c8c4b9f28062f41583 100755 --- a/9/postgres-tomcat/xwiki/docker-entrypoint.sh +++ b/9/postgres-tomcat/xwiki/docker-entrypoint.sh @@ -127,6 +127,7 @@ function configure() { xwiki_set_cfg 'xwiki.store.attachment.recyclebin.content.hint' 'file' echo ' Using filesystem-based deleted documents...' xwiki_set_cfg 'xwiki.store.recyclebin.content.hint' 'file' + echo ' Generating authentication validation and encryption keys...' xwiki_set_cfg 'xwiki.authentication.validationKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" xwiki_set_cfg 'xwiki.authentication.encryptionKey' "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" diff --git a/template/xwiki/docker-entrypoint.sh b/template/xwiki/docker-entrypoint.sh index da52db76f356191a3f01fbc1c8a6d212b046d177..dbff90c09514ac62c8de3f8c702df26419262ae2 100755 --- a/template/xwiki/docker-entrypoint.sh +++ b/template/xwiki/docker-entrypoint.sh @@ -120,13 +120,15 @@ function configure() { safesed "replacepassword" \$DB_PASSWORD /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml safesed "replacecontainer" \$DB_HOST /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml safesed "replacedatabase" \$DB_DATABASE /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml - +<% if (xwikiVersion.startsWith('9.')) +print ''' echo ' Using filesystem-based attachments...' xwiki_set_cfg 'xwiki.store.attachment.hint' 'file' xwiki_set_cfg 'xwiki.store.attachment.versioning.hint' 'file' xwiki_set_cfg 'xwiki.store.attachment.recyclebin.content.hint' 'file' echo ' Using filesystem-based deleted documents...' xwiki_set_cfg 'xwiki.store.recyclebin.content.hint' 'file' +'''%> echo ' Generating authentication validation and encryption keys...' xwiki_set_cfg 'xwiki.authentication.validationKey' "\$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" xwiki_set_cfg 'xwiki.authentication.encryptionKey' "\$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"