Add variable for setting table session

- this allows LimeSurvey to scale horizontally
This commit is contained in:
Markus Opolka
2021-07-21 16:54:26 +02:00
committed by Markus Opolka
parent e3223f7a87
commit 05ec82a41c
7 changed files with 82 additions and 3 deletions

View File

@@ -19,6 +19,8 @@ ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
BASE_URL=${BASE_URL:-} BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -89,10 +91,15 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
'showScriptName' => true, 'showScriptName' => $SHOW_SCRIPT_NAME,
), ),
'request' => array( 'request' => array(
'baseUrl' => '$BASE_URL', 'baseUrl' => '$BASE_URL',
@@ -109,6 +116,12 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if LimeSurvey database is provisioned # Check if LimeSurvey database is provisioned
echo 'Info: Check if database already provisioned. Nevermind the Stack trace.' echo 'Info: Check if database already provisioned. Nevermind the Stack trace.'

View File

@@ -19,6 +19,8 @@ ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
BASE_URL=${BASE_URL:-} BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -82,10 +84,15 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
'showScriptName' => true, 'showScriptName' => $SHOW_SCRIPT_NAME,
), ),
'request' => array( 'request' => array(
'baseUrl' => '$BASE_URL', 'baseUrl' => '$BASE_URL',
@@ -102,6 +109,12 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if LimeSurvey database is provisioned # Check if LimeSurvey database is provisioned
echo 'Info: Check if database already provisioned. Nevermind the Stack trace.' echo 'Info: Check if database already provisioned. Nevermind the Stack trace.'

View File

@@ -19,6 +19,8 @@ ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
BASE_URL=${BASE_URL:-} BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -82,10 +84,15 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
'showScriptName' => true, 'showScriptName' => $SHOW_SCRIPT_NAME,
), ),
'request' => array( 'request' => array(
'baseUrl' => '$BASE_URL', 'baseUrl' => '$BASE_URL',
@@ -102,6 +109,12 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if LimeSurvey database is provisioned # Check if LimeSurvey database is provisioned
echo 'Info: Check if database already provisioned. Nevermind the Stack trace.' echo 'Info: Check if database already provisioned. Nevermind the Stack trace.'

View File

@@ -24,6 +24,7 @@ BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'} SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -94,6 +95,11 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
@@ -114,6 +120,13 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if security config already provisioned # Check if security config already provisioned
if [ -f application/config/security.php ]; then if [ -f application/config/security.php ]; then
echo 'Info: security.php already provisioned' echo 'Info: security.php already provisioned'

View File

@@ -24,6 +24,7 @@ BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'} SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -87,6 +88,11 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
@@ -107,6 +113,13 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if security config already provisioned # Check if security config already provisioned
if [ -f application/config/security.php ]; then if [ -f application/config/security.php ]; then
echo 'Info: security.php already provisioned' echo 'Info: security.php already provisioned'

View File

@@ -24,6 +24,7 @@ BASE_URL=${BASE_URL:-}
PUBLIC_URL=${PUBLIC_URL:-} PUBLIC_URL=${PUBLIC_URL:-}
URL_FORMAT=${URL_FORMAT:-'path'} URL_FORMAT=${URL_FORMAT:-'path'}
SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'} SHOW_SCRIPT_NAME=${SHOW_SCRIPT_NAME:-'true'}
TABLE_SESSION=${TABLE_SESSION:-}
DEBUG=${DEBUG:-0} DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0} DEBUG_SQL=${DEBUG_SQL:-0}
@@ -87,6 +88,11 @@ return array(
'charset' => '$DB_CHARSET', 'charset' => '$DB_CHARSET',
'tablePrefix' => '$DB_TABLE_PREFIX', 'tablePrefix' => '$DB_TABLE_PREFIX',
), ),
//'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
//),
'urlManager' => array( 'urlManager' => array(
'urlFormat' => '$URL_FORMAT', 'urlFormat' => '$URL_FORMAT',
'rules' => array(), 'rules' => array(),
@@ -107,6 +113,13 @@ EOF
fi fi
# Enable Table Sessions if required
if [ -n "$TABLE_SESSION" ]; then
echo 'Info: Setting Table Session'
# Remove the comments in the config
sed -i "s/\/\///g" application/config/config.php
fi
# Check if security config already provisioned # Check if security config already provisioned
if [ -f application/config/security.php ]; then if [ -f application/config/security.php ]; then
echo 'Info: security.php already provisioned' echo 'Info: security.php already provisioned'

View File

@@ -113,6 +113,7 @@ For further details on the settings see: https://manual.limesurvey.org/Data_encr
| PUBLIC_URL | Public URL for public scripts | | PUBLIC_URL | Public URL for public scripts |
| BASE_URL | Application Base URL | | BASE_URL | Application Base URL |
| URL_FORMAT | URL Format. path or get | | URL_FORMAT | URL Format. path or get |
| TABLE_SESSION | Enable table sessions (true) |
| SHOW_SCRIPT_NAME | Script name in URL (true|false). Default: true | | SHOW_SCRIPT_NAME | Script name in URL (true|false). Default: true |
| DEBUG | Debug level (0, 1, 2). Default: 0 | | DEBUG | Debug level (0, 1, 2). Default: 0 |
| DEBUG_SQL | SQL Debug level (0, 1, 2). Default 0 | | DEBUG_SQL | SQL Debug level (0, 1, 2). Default 0 |