Commit e5654c63 authored by Tobias Munk's avatar Tobias Munk

Merge branch 'master' into feature/php-8.1

parents 19189e54 e675dbf2
Pipeline #85161 passed with stage
in 6 minutes and 46 seconds
...@@ -3,6 +3,7 @@ ARG BUILD_NO_INSTALL ...@@ -3,6 +3,7 @@ ARG BUILD_NO_INSTALL
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y $PHPIZE_DEPS \ && apt-get install -y $PHPIZE_DEPS \
ssh \
default-mysql-client \ default-mysql-client \
cron \ cron \
procps # recommended for dmstr/yii2-resque-module \ procps # recommended for dmstr/yii2-resque-module \
...@@ -14,7 +15,8 @@ RUN apt-get update \ ...@@ -14,7 +15,8 @@ RUN apt-get update \
ENV SUPERVISOR_START_CRON=true \ ENV SUPERVISOR_START_CRON=true \
SUPERVISOR_START_WORKER=true \ SUPERVISOR_START_WORKER=true \
SUPERVISOR_START_EXPORT_ENV=true SUPERVISOR_START_EXPORT_ENV=true \
SUPERVISOR_WORKER_CMD_OPTS=""
# System files # System files
COPY ./image-files / COPY ./image-files /
......
...@@ -407,7 +407,7 @@ return [ ...@@ -407,7 +407,7 @@ return [
], ],
'audit/mail' => [ 'audit/mail' => [
'class' => MailPanel::class, 'class' => MailPanel::class,
'maxAge' => null 'maxAge' => 30
], ],
// Links the extra error reporting functions (`exception()` and `errorMessage()`) // Links the extra error reporting functions (`exception()` and `errorMessage()`)
'audit/error' => [ 'audit/error' => [
......
...@@ -83,6 +83,21 @@ return [ ...@@ -83,6 +83,21 @@ return [
], ],
], ],
], ],
'dbSystem' => [
'on ' . yii\db\Connection::EVENT_AFTER_OPEN => function ($event) {
if ($event->sender->driverName === 'mysql') {
// set session wait_timeout for this connection to mysql default value to prevent connection-timeouts
// in e.g. audit module while exec long-running CLI processes
$event->sender->createCommand(
'SET SESSION wait_timeout = :timeout;',
[
':timeout' => (int)getenv('DB_ENV_MYSQL_CLI_WAIT_TIMEOUT') ?: 28800
]
)->execute();
}
},
],
], ],
'modules' => [ 'modules' => [
'user' => [ 'user' => [
......
...@@ -116,6 +116,9 @@ DATABASE_USER=${DB_ENV_MYSQL_USER} ...@@ -116,6 +116,9 @@ DATABASE_USER=${DB_ENV_MYSQL_USER}
DATABASE_PASSWORD=${DB_ENV_MYSQL_PASSWORD} DATABASE_PASSWORD=${DB_ENV_MYSQL_PASSWORD}
DATABASE_TABLE_PREFIX=app_ DATABASE_TABLE_PREFIX=app_
# set session wait_timeout for cli dbSystem mysql connection to prevent connection-timeouts
DB_ENV_MYSQL_CLI_WAIT_TIMEOUT=28800
# Cache # Cache
# ----- # -----
......
[program:worker] [program:worker]
command=yii queue/listen command=yii queue/listen %(ENV_SUPERVISOR_WORKER_CMD_OPTS)s
autostart=%(ENV_SUPERVISOR_START_WORKER)s autostart=%(ENV_SUPERVISOR_START_WORKER)s
autorestart=true autorestart=true
priority=70 priority=70
......
...@@ -7,10 +7,14 @@ ...@@ -7,10 +7,14 @@
"ap": { "ap": {
"type": "composer", "type": "composer",
"url": "https://asset-packagist.org" "url": "https://asset-packagist.org"
},
"merge-plugin": {
"type": "vcs",
"url": "https://github.com/schmunk42/composer-merge-plugin.git"
} }
}, },
"require": { "require": {
"wikimedia/composer-merge-plugin": "~2.0" "wikimedia/composer-merge-plugin": "dev-feature/respect-lockdown"
}, },
"extra": { "extra": {
"merge-plugin": { "merge-plugin": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -58,5 +58,12 @@ ...@@ -58,5 +58,12 @@
"dmstr/yii2-active-record-permissions": "<1.2.2", "dmstr/yii2-active-record-permissions": "<1.2.2",
"fxp/composer-asset-plugin": "*", "fxp/composer-asset-plugin": "*",
"dmstr/yii2-web": "<1.1.1" "dmstr/yii2-web": "<1.1.1"
},
"repositories": {
"2amigos/yii2-ckeditor-widget": {
"name": "dmstr-forks/2amigos-yii2-ckeditor-widget",
"type": "vcs",
"url": "https://github.com/dmstr-forks/2amigos-yii2-ckeditor-widget"
}
} }
} }
...@@ -18,6 +18,9 @@ return yii\helpers\ArrayHelper::merge( ...@@ -18,6 +18,9 @@ return yii\helpers\ArrayHelper::merge(
[ [
'language' => 'en', 'language' => 'en',
'components' => [ 'components' => [
'redis' => [
'database' => 8
],
'request' => [ 'request' => [
'cookieValidationKey' => 'FUNCTIONAL_TESTING' 'cookieValidationKey' => 'FUNCTIONAL_TESTING'
], ],
......
...@@ -33,6 +33,9 @@ return [ ...@@ -33,6 +33,9 @@ return [
'backend.iframe.name' => 'backend-test', 'backend.iframe.name' => 'backend-test',
], ],
'components' => [ 'components' => [
'redis' => [
'database' => 9
],
'user' => [ 'user' => [
'loginUrl' => '/user/login' 'loginUrl' => '/user/login'
] ]
......
...@@ -6,5 +6,6 @@ $I = new CliTester($scenario); ...@@ -6,5 +6,6 @@ $I = new CliTester($scenario);
$I->runShellCommand('yii audit/cleanup --interactive=0'); $I->runShellCommand('yii audit/cleanup --interactive=0');
$I->seeInShellOutput('skipped audit/trail'); $I->seeInShellOutput('skipped audit/trail');
$I->seeInShellOutput('skipped audit/mail'); $I->seeInShellOutput('cleaned audit/mail');
$I->seeInShellOutput('cleaned audit/error');
$I->seeInShellOutput('Cleanup was successful'); $I->seeInShellOutput('Cleanup was successful');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment