From 61985ce4f1b7f45015ba3e982570139b4f6bf331 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 5 Jan 2023 11:00:15 +0100 Subject: [PATCH] Add howto sections for testing S3 and email Added section about how to test email sending. Added section about how to test S3 as primary and external storage. Signed-off-by: Vincent Petry --- developer_manual/how_to/index.rst | 66 +++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/developer_manual/how_to/index.rst b/developer_manual/how_to/index.rst index 720b29f2f7a..74fbe3f093e 100644 --- a/developer_manual/how_to/index.rst +++ b/developer_manual/how_to/index.rst @@ -4,6 +4,18 @@ How to test ... This page should explain how to test given features in Nextcloud. +Email sending +------------- + +:: + + docker run -d -p 1025:1025 -p 8025:8025 mailhog/mailhog + occ config:system:set mail_smtpmode --value=smtp + occ config:system:set mail_smtphost --value=127.0.0.1 + occ config:system:set mail_smtpport --value=1025 --type=integer + +Then after having Nextcloud send some emails, open http://127.0.0.1:8025 to view them. + Redis ----- @@ -12,8 +24,8 @@ First you need to install the `phpredis extension `_. It boils down to clone the repo and run `make up`. Then the redis cluster is available at ``localhost:7000``. @@ -29,11 +41,57 @@ Following ``config.php`` can be used:: 'failover_mode' => \RedisCluster::FAILOVER_ERROR, ], -SMB ---- +Primary object store with S3 +---------------------------- + +:: + + docker run -p 9000:9000 minio/minio server /data + +The edit ``config.php`` and add the following section:: + + 'objectstore' => + array ( + 'class' => 'OC\\Files\\ObjectStore\\S3', + 'arguments' => + array ( + 'bucket' => 'nextcloud-dev', + 'key' => 'minioadmin', + 'secret' => 'minioadmin', + 'hostname' => 'localhost', + 'port' => '9000', + 'use_ssl' => false, + 'use_path_style' => true, + ), + ), + +S3 external storage +------------------- :: + occ app:enable files_external + + docker run -p 9000:9000 minio/minio server /data + +Then add an external storage in the web UI using the following configuration: + +- Authentication type: Access key +- Access key: minioadmin +- Secret key: minioadmin +- Bucket: nextcloud-dev +- Hostname: localhost +- Port: 9000 +- Region: leave empty +- Enable path style: yes + +SMB external storage +-------------------- + +:: + + occ app:enable files_external + mkdir /tmp/samba docker run -it -p 139:139 -p 445:445 \ -v /tmp/samba:/smbmount dperson/samba \