mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-14 00:16:09 +02:00
Add objectPrefix et autocreate environment variables (#1389)
Signed-off-by: johackim <contact@johackim.com>
This commit is contained in:
parent
8b9ca85ac5
commit
94e751cd97
2 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
if (getenv('OBJECTSTORE_S3_BUCKET')) {
|
if (getenv('OBJECTSTORE_S3_BUCKET')) {
|
||||||
$use_ssl = getenv('OBJECTSTORE_S3_SSL');
|
$use_ssl = getenv('OBJECTSTORE_S3_SSL');
|
||||||
$use_path = getenv('OBJECTSTORE_S3_USEPATH_STYLE');
|
$use_path = getenv('OBJECTSTORE_S3_USEPATH_STYLE');
|
||||||
|
$autocreate = getenv('OBJECTSTORE_S3_AUTOCREATE');
|
||||||
$CONFIG = array(
|
$CONFIG = array(
|
||||||
'objectstore' => array(
|
'objectstore' => array(
|
||||||
'class' => '\OC\Files\ObjectStore\S3',
|
'class' => '\OC\Files\ObjectStore\S3',
|
||||||
|
@ -12,6 +13,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) {
|
||||||
'region' => getenv('OBJECTSTORE_S3_REGION') ?: '',
|
'region' => getenv('OBJECTSTORE_S3_REGION') ?: '',
|
||||||
'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '',
|
'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '',
|
||||||
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
|
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
|
||||||
|
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
|
||||||
|
'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true,
|
||||||
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true,
|
'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true,
|
||||||
// required for some non Amazon S3 implementations
|
// required for some non Amazon S3 implementations
|
||||||
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false'
|
'use_path_style' => $use_path == true && strtolower($use_path) !== 'false'
|
||||||
|
|
|
@ -165,6 +165,8 @@ To use an external S3 compatible object store as primary storage, set the follow
|
||||||
- `OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server
|
- `OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server
|
||||||
- `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in.
|
- `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in.
|
||||||
- `OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3
|
- `OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3
|
||||||
|
- `OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid
|
||||||
|
- `OBJECTSTORE_S3_AUTOCREATE` (default: `true`): Create the container if it does not exist
|
||||||
|
|
||||||
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information.
|
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue