diff --git a/.env b/.env index e29c679a30..6b7cab04ad 100644 --- a/.env +++ b/.env @@ -20,6 +20,7 @@ _APP_DB_PORT=3306 _APP_DB_SCHEMA=appwrite _APP_DB_USER=root _APP_DB_PASS=password +_APP_STORAGE_DEVICE=local _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 diff --git a/Dockerfile b/Dockerfile index 88d6aadbab..7f1d23e2ca 100755 --- a/Dockerfile +++ b/Dockerfile @@ -140,6 +140,11 @@ ENV _APP_SERVER=swoole \ _APP_STORAGE_ANTIVIRUS=enabled \ _APP_STORAGE_ANTIVIRUS_HOST=clamav \ _APP_STORAGE_ANTIVIRUS_PORT=3310 \ + _APP_STORAGE_DEVICE=local \ + _APP_STORAGE_DEVICE_S3_ACCESS_KEY= \ + _APP_STORAGE_DEVICE_S3_SECRET= \ + _APP_STORAGE_DEVICE_S3_REGION= \ + _APP_STORAGE_DEVICE_S3_BUCKET= \ _APP_REDIS_HOST=redis \ _APP_REDIS_PORT=6379 \ _APP_DB_HOST=mariadb \ diff --git a/app/config/variables.php b/app/config/variables.php index a5ae6e46dd..1b9da56f72 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -402,6 +402,46 @@ return [ 'question' => '', 'filter' => '' ], + [ + 'name' => '_APP_STORAGE_DEVICE', + 'description' => 'Select default storage device. The default value is \'Local\'. List of supported adapters are \'Local\' and \'S3\'.', + 'introduction' => '0.12.0', + 'default' => 'Local', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_DEVICE_S3_ACCESS_KEY', + 'description' => 'AWS S3 storage access key. Required when the storage adapter is set to S3. You can get your access key from your AWS console', + 'introduction' => '0.12.0', + 'default' => '', + 'required' => true, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_DEVICE_S3_SECRET', + 'description' => 'AWS S3 storage secret key. Required when the storage adapter is set to S3. You can get your secret key from your AWS console.', + 'introduction' => '0.12.0', + 'default' => '', + 'required' => true, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_DEVICE_S3_REGION', + 'description' => 'AWS S3 storage region. Required when storage adapter is set to S3. You can find your region info for your bucket from AWS console.', + 'introduction' => '0.12.0', + 'default' => 'us-eas-1', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_DEVICE_S3_BUCKET', + 'description' => 'AWS S3 storage bucket. Required when storage adapter is set to S3. You can create buckets in your AWS console.', + 'introduction' => '0.12.0', + 'default' => '', + 'required' => true, + 'question' => '', + ], ], ], [ diff --git a/docker-compose.yml b/docker-compose.yml index b2d86fd36f..5a174f7c05 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -113,6 +113,11 @@ services: - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT + - _APP_STORAGE_DEVICE + - _APP_STORAGE_DEVICE_S3_ACCESS_KEY + - _APP_STORAGE_DEVICE_S3_SECRET + - _APP_STORAGE_DEVICE_S3_REGION + - _APP_STORAGE_DEVICE_S3_BUCKET - _APP_SMTP_HOST - _APP_SMTP_PORT - _APP_SMTP_SECURE