Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Add support to nextcloud image to use an S3 bucket as primary storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Brown committed Aug 25, 2017
1 parent f33846f commit 675f030
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nextcloud/rootfs/usr/local/bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF;
# Setup S3 as a backend for primary storage
'objectstore' => 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 <<EOF;
);
Expand Down

0 comments on commit 675f030

Please sign in to comment.