mirror of
https://github.com/nextcloud/docker.git
synced 2025-06-16 16:14:47 +02:00
Add primary-object-storage.config.php files to all Docker sources
Signed-off-by: Nicholas Istre <nickistre@gmail.com>
This commit is contained in:
parent
ba1500b05e
commit
6d62f4737f
13 changed files with 507 additions and 0 deletions
39
.config/primary-object-storage.config.php
Normal file
39
.config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
16.0/apache/config/primary-object-storage.config.php
Normal file
39
16.0/apache/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
16.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
39
16.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
16.0/fpm/config/primary-object-storage.config.php
Normal file
39
16.0/fpm/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
17.0/apache/config/primary-object-storage.config.php
Normal file
39
17.0/apache/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
17.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
39
17.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
17.0/fpm/config/primary-object-storage.config.php
Normal file
39
17.0/fpm/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
18.0/apache/config/primary-object-storage.config.php
Normal file
39
18.0/apache/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
18.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
39
18.0/fpm-alpine/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
18.0/fpm/config/primary-object-storage.config.php
Normal file
39
18.0/fpm/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
19.0-rc/apache/config/primary-object-storage.config.php
Normal file
39
19.0-rc/apache/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
19.0-rc/fpm-alpine/config/primary-object-storage.config.php
Normal file
39
19.0-rc/fpm-alpine/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
39
19.0-rc/fpm/config/primary-object-storage.config.php
Normal file
39
19.0-rc/fpm/config/primary-object-storage.config.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (getenv('S3_BUCKETNAME') && getenv('S3_ACCESS_KEY') && getenv('S3_SECRET_KEY')) {
|
||||
// Set required configurations
|
||||
$CONFIG = array (
|
||||
'objectstore' => array (
|
||||
'class' => '\\OC\\Files\\ObjectStore\\S3',
|
||||
'arguments' => array (
|
||||
'bucket' => getenv('S3_BUCKETNAME'),
|
||||
'key' => getenv('S3_ACCESS_KEY'),
|
||||
'secret' => getenv('S3_SECRET_KEY'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Set optional configurations
|
||||
if (getenv('S3_AUTOCREATE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['autocreate'] = (bool) getenv('S3_AUTOCREATE');
|
||||
}
|
||||
|
||||
if (getenv('S3_HOST') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['hostname'] = getenv('S3_HOST');
|
||||
}
|
||||
|
||||
if (getenv('S3_PORT') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['port'] = (int) getenv('S3_PORT');
|
||||
}
|
||||
|
||||
if (getenv('S3_REGION') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['region'] = getenv('S3_REGION');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_SSL') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_ssl'] = (bool) getenv('S3_USE_SSL');
|
||||
}
|
||||
|
||||
if (getenv('S3_USE_PATH_STYLE') !== false) {
|
||||
$CONFIG['objectstore']['arguments']['use_path_style'] = (bool) getenv('S3_USE_PATH_STYLE');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue