From 3aa78a1a0f81b199a39ee531549585136fe3d68b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 27 Oct 2020 21:56:37 +0200 Subject: [PATCH] Updated default upload size --- .env | 2 +- Dockerfile | 4 ++-- Dockerfile.nginx | 2 +- app/config/variables.php | 2 +- app/http.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 30b4a83f79..9764cfe894 100644 --- a/.env +++ b/.env @@ -24,6 +24,6 @@ _APP_SMTP_PORT=25 _APP_SMTP_SECURE= _APP_SMTP_USERNAME= _APP_SMTP_PASSWORD= -_APP_STORAGE_LIMIT=100000000 +_APP_STORAGE_LIMIT=10000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_CONTAINERS=10 diff --git a/Dockerfile b/Dockerfile index 60db675960..9a1003cba6 100755 --- a/Dockerfile +++ b/Dockerfile @@ -75,7 +75,7 @@ ENV _APP_SERVER=swoole \ _APP_OPTIONS_ABUSE=enabled \ _APP_OPTIONS_FORCE_HTTPS=disabled \ _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=100000000 \ + _APP_STORAGE_LIMIT=10000000 \ _APP_STORAGE_ANTIVIRUS=enabled \ _APP_REDIS_HOST=redis \ _APP_REDIS_PORT=6379 \ @@ -180,7 +180,7 @@ RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.ini RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini -RUN echo "opcache.enable_cli = 1" >> /usr/local/etc/php/conf.d/appwrite.ini +RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/appwrite.ini EXPOSE 80 diff --git a/Dockerfile.nginx b/Dockerfile.nginx index 3bd88a7d34..b7acd23a7f 100644 --- a/Dockerfile.nginx +++ b/Dockerfile.nginx @@ -60,7 +60,7 @@ ENV TZ=Asia/Tel_Aviv \ _APP_OPTIONS_ABUSE=enabled \ _APP_OPTIONS_FORCE_HTTPS=disabled \ _APP_OPENSSL_KEY_V1=your-secret-key \ - _APP_STORAGE_LIMIT=100000000 \ + _APP_STORAGE_LIMIT=10000000 \ _APP_STORAGE_ANTIVIRUS=enabled \ _APP_REDIS_HOST=redis \ _APP_REDIS_PORT=6379 \ diff --git a/app/config/variables.php b/app/config/variables.php index 66308fcef0..3da5a21e25 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -135,7 +135,7 @@ return [ ], [ 'name' => '_APP_STORAGE_LIMIT', - 'default' => '100000000', + 'default' => '10000000', 'required' => false, 'question' => '', ], diff --git a/app/http.php b/app/http.php index a5f0dbd438..89b3d1f9e8 100644 --- a/app/http.php +++ b/app/http.php @@ -23,7 +23,7 @@ sleep(2); $http = new Server("0.0.0.0", 80); -$payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 100000000)); +$payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 10000000 /* 10mb */)); $http ->set([ @@ -49,7 +49,7 @@ $http->on('AfterReload', function($serv, $workerId) { }); $http->on('start', function (Server $http) use ($payloadSize) { - Console::success('Server started succefully (max payload is '.$payloadSize.' bytes)'); + Console::success('Server started succefully (max payload is '.number_format($payloadSize).' bytes)'); Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}");