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

Commit 675f030

Browse files
author
Pete Brown
committed
Add support to nextcloud image to use an S3 bucket as primary storage
1 parent f33846f commit 675f030

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nextcloud/rootfs/usr/local/bin/setup.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@ if [[ ! -z "$ADMIN_USER" ]]; then
5757
'adminlogin' => '${ADMIN_USER}',
5858
'adminpass' => '${ADMIN_PASSWORD}',
5959
EOF
60+
if [[ ! -z "$DATASTORE_BUCKET" ]]; then
61+
cat >> /nextcloud/config/autoconfig.php <<EOF;
62+
# Setup S3 as a backend for primary storage
63+
'objectstore' => array (
64+
'class' => 'OC\\Files\\ObjectStore\\S3',
65+
'arguments' => array (
66+
'bucket' => '${DATASTORE_BUCKET}',
67+
'autocreate' => false,
68+
'key' => '${DATASTORE_KEY}',
69+
'secret' => '${DATASTORE_SECRET}',
70+
'hostname' => '${DATASTORE_URL}',
71+
'use_ssl' => true,
72+
'port' => '${DATASTORE_PORT:443}',
73+
'use_ssl' => true,
74+
// required for some non amazon s3 implementations
75+
'use_path_style' => true,
76+
),
77+
),
78+
EOF
6079
fi
6180
cat >> /nextcloud/config/autoconfig.php <<EOF;
6281
);

0 commit comments

Comments
 (0)