feat: review comments
This commit is contained in:
parent
f538c1d2bf
commit
2a29e10007
6
.env
6
.env
|
@ -35,7 +35,7 @@ _APP_FUNCTIONS_CPUS=1
|
||||||
_APP_FUNCTIONS_MEMORY=128
|
_APP_FUNCTIONS_MEMORY=128
|
||||||
_APP_FUNCTIONS_MEMORY_SWAP=128
|
_APP_FUNCTIONS_MEMORY_SWAP=128
|
||||||
_APP_MAINTENANCE_INTERVAL=86400
|
_APP_MAINTENANCE_INTERVAL=86400
|
||||||
_APP_MAINTENANCE_EXECUTION_LOG_RETENTION=1209600
|
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
|
||||||
_APP_MAINTENANCE_ABUSE_LOG_RETENTION=86400
|
_APP_MAINTENANCE_RETENTION_ABUSE=86400
|
||||||
_APP_MAINTENANCE_AUDIT_LOG_RETENTION=1209600
|
_APP_MAINTENANCE_RETENTION_AUDIT=1209600
|
||||||
_APP_USAGE_STATS=enabled
|
_APP_USAGE_STATS=enabled
|
||||||
|
|
|
@ -101,10 +101,10 @@ ENV _APP_SERVER=swoole \
|
||||||
_APP_VERSION=$VERSION \
|
_APP_VERSION=$VERSION \
|
||||||
_APP_USAGE_STATS=enabled \
|
_APP_USAGE_STATS=enabled \
|
||||||
# 14 Days = 1209600 s
|
# 14 Days = 1209600 s
|
||||||
_APP_MAINTENANCE_EXECUTION_LOG_RETENTION=1209600 \
|
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600 \
|
||||||
_APP_MAINTENANCE_AUDIT_LOG_RETENTION=1209600 \
|
_APP_MAINTENANCE_RETENTION_AUDIT=1209600 \
|
||||||
# 1 Day = 86400 s
|
# 1 Day = 86400 s
|
||||||
_APP_MAINTENANCE_ABUSE_LOG_RETENTION=86400 \
|
_APP_MAINTENANCE_RETENTION_ABUSE=86400 \
|
||||||
_APP_MAINTENANCE_INTERVAL=86400
|
_APP_MAINTENANCE_INTERVAL=86400
|
||||||
#ENV _APP_SMTP_SECURE ''
|
#ENV _APP_SMTP_SECURE ''
|
||||||
#ENV _APP_SMTP_USERNAME ''
|
#ENV _APP_SMTP_USERNAME ''
|
||||||
|
|
|
@ -365,7 +365,7 @@ return [
|
||||||
'question' => '',
|
'question' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_MAINTENANCE_EXECUTION_LOG_RETENTION',
|
'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION',
|
||||||
'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).',
|
'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '1209600',
|
'default' => '1209600',
|
||||||
|
@ -373,7 +373,7 @@ return [
|
||||||
'question' => '',
|
'question' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_MAINTENANCE_AUDIT_LOG_RETENTION',
|
'name' => '_APP_MAINTENANCE_RETENTION_AUDIT',
|
||||||
'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).',
|
'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '1209600',
|
'default' => '1209600',
|
||||||
|
@ -381,7 +381,7 @@ return [
|
||||||
'question' => '',
|
'question' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_MAINTENANCE_ABUSE_LOG_RETENTION',
|
'name' => '_APP_MAINTENANCE_RETENTION_ABUSE',
|
||||||
'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).',
|
'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).',
|
||||||
'introduction' => '0.7.0',
|
'introduction' => '0.7.0',
|
||||||
'default' => '86400',
|
'default' => '86400',
|
||||||
|
|
|
@ -42,9 +42,9 @@ $cli
|
||||||
->action(function () {
|
->action(function () {
|
||||||
// # of days in seconds (1 day = 86400s)
|
// # of days in seconds (1 day = 86400s)
|
||||||
$interval = (int) App::getEnv('_APP_MAINTENANCE_INTERVAL', '86400');
|
$interval = (int) App::getEnv('_APP_MAINTENANCE_INTERVAL', '86400');
|
||||||
$executionLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_EXECUTION_LOG_RETENTION', '1209600');
|
$executionLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_EXECUTION', '1209600');
|
||||||
$auditLogRetention = (int) App::getEnv('_APP_MAINTENANCE_AUDIT_LOG_RETENTION', '1209600');
|
$auditLogRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', '1209600');
|
||||||
$abuseLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_ABUSE_LOG_RETENTION', '86400');
|
$abuseLogsRetention = (int) App::getEnv('_APP_MAINTENANCE_RETENTION_ABUSE', '86400');
|
||||||
|
|
||||||
Console::loop(function() use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention){
|
Console::loop(function() use ($interval, $executionLogsRetention, $abuseLogsRetention, $auditLogRetention){
|
||||||
$time = date('d-m-Y H:i:s', time());
|
$time = date('d-m-Y H:i:s', time());
|
||||||
|
|
|
@ -279,11 +279,10 @@ services:
|
||||||
- _APP_REDIS_HOST
|
- _APP_REDIS_HOST
|
||||||
- _APP_REDIS_PORT
|
- _APP_REDIS_PORT
|
||||||
- _APP_MAINTENANCE_INTERVAL
|
- _APP_MAINTENANCE_INTERVAL
|
||||||
- _APP_DB_HOST
|
- _APP_MAINTENANCE_RETENTION_EXECUTION
|
||||||
- _APP_DB_PORT
|
- _APP_MAINTENANCE_RETENTION_ABUSE
|
||||||
- _APP_DB_SCHEMA
|
- _APP_MAINTENANCE_RETENTION_AUDIT
|
||||||
- _APP_DB_USER
|
|
||||||
- _APP_DB_PASS
|
|
||||||
|
|
||||||
appwrite-schedule:
|
appwrite-schedule:
|
||||||
image: appwrite/appwrite:<?php echo $version."\n"; ?>
|
image: appwrite/appwrite:<?php echo $version."\n"; ?>
|
||||||
|
|
|
@ -329,9 +329,9 @@ services:
|
||||||
- _APP_REDIS_HOST
|
- _APP_REDIS_HOST
|
||||||
- _APP_REDIS_PORT
|
- _APP_REDIS_PORT
|
||||||
- _APP_MAINTENANCE_INTERVAL
|
- _APP_MAINTENANCE_INTERVAL
|
||||||
- _APP_MAINTENANCE_EXECUTION_LOG_RETENTION
|
- _APP_MAINTENANCE_RETENTION_EXECUTION
|
||||||
- _APP_MAINTENANCE_ABUSE_LOG_RETENTION
|
- _APP_MAINTENANCE_RETENTION_ABUSE
|
||||||
- _APP_MAINTENANCE_AUDIT_LOG_RETENTION
|
- _APP_MAINTENANCE_RETENTION_AUDIT
|
||||||
|
|
||||||
appwrite-schedule:
|
appwrite-schedule:
|
||||||
entrypoint: schedule
|
entrypoint: schedule
|
||||||
|
|
Loading…
Reference in a new issue