diff --git a/nextcloud/rootfs/usr/local/bin/setup.sh b/nextcloud/rootfs/usr/local/bin/setup.sh index df299926..a4f1effd 100755 --- a/nextcloud/rootfs/usr/local/bin/setup.sh +++ b/nextcloud/rootfs/usr/local/bin/setup.sh @@ -57,6 +57,25 @@ if [[ ! -z "$ADMIN_USER" ]]; then 'adminlogin' => '${ADMIN_USER}', 'adminpass' => '${ADMIN_PASSWORD}', EOF +if [[ ! -z "$DATASTORE_BUCKET" ]]; then + cat >> /nextcloud/config/autoconfig.php < array ( + 'class' => 'OC\\Files\\ObjectStore\\S3', + 'arguments' => array ( + 'bucket' => '${DATASTORE_BUCKET}', + 'autocreate' => false, + 'key' => '${DATASTORE_KEY}', + 'secret' => '${DATASTORE_SECRET}', + 'hostname' => '${DATASTORE_URL}', + 'use_ssl' => true, + 'port' => '${DATASTORE_PORT:443}', + 'use_ssl' => true, + // required for some non amazon s3 implementations + 'use_path_style' => true, + ), + ), +EOF fi cat >> /nextcloud/config/autoconfig.php <