2012-10-27 05:22:00 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2024-05-10 09:09:14 -04:00
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
*/
|
2015-03-19 04:07:29 -04:00
|
|
|
$CONFIG = [
|
|
|
|
|
'appstoreenabled' => false,
|
|
|
|
|
'apps_paths' => [
|
|
|
|
|
[
|
2020-10-05 09:12:57 -04:00
|
|
|
'path' => OC::$SERVERROOT . '/apps',
|
|
|
|
|
'url' => '/apps',
|
|
|
|
|
'writable' => true,
|
2015-03-19 04:07:29 -04:00
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
];
|
2013-10-14 18:29:47 -04:00
|
|
|
|
2015-03-19 04:07:29 -04:00
|
|
|
if (is_dir(OC::$SERVERROOT . '/apps2')) {
|
|
|
|
|
$CONFIG['apps_paths'][] = [
|
|
|
|
|
'path' => OC::$SERVERROOT . '/apps2',
|
|
|
|
|
'url' => '/apps2',
|
|
|
|
|
'writable' => false,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-16 06:43:38 -05:00
|
|
|
if (getenv('OBJECT_STORE') === 's3') {
|
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\S3',
|
2020-03-26 04:30:18 -04:00
|
|
|
'arguments' => [
|
2016-11-16 06:43:38 -05:00
|
|
|
'bucket' => 'nextcloud',
|
|
|
|
|
'autocreate' => true,
|
2023-10-28 19:16:46 -04:00
|
|
|
'key' => getenv('OBJECT_STORE_KEY') ?: 'nextcloud',
|
|
|
|
|
'secret' => getenv('OBJECT_STORE_SECRET') ?: 'nextcloud',
|
|
|
|
|
'hostname' => getenv('OBJECT_STORE_HOST') ?: 'localhost',
|
2021-05-28 13:24:21 -04:00
|
|
|
'port' => 9000,
|
2016-11-16 06:43:38 -05:00
|
|
|
'use_ssl' => false,
|
|
|
|
|
// required for some non amazon s3 implementations
|
|
|
|
|
'use_path_style' => true
|
2020-03-26 04:30:18 -04:00
|
|
|
]
|
2016-11-16 06:43:38 -05:00
|
|
|
];
|
2024-09-20 04:28:19 -04:00
|
|
|
} elseif (getenv('OBJECT_STORE') === 's3-multibucket') {
|
|
|
|
|
$CONFIG['objectstore_multibucket'] = [
|
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\S3',
|
|
|
|
|
'arguments' => [
|
|
|
|
|
'bucket' => 'nextcloud',
|
|
|
|
|
'autocreate' => true,
|
|
|
|
|
'key' => getenv('OBJECT_STORE_KEY') ?: 'nextcloud',
|
|
|
|
|
'secret' => getenv('OBJECT_STORE_SECRET') ?: 'nextcloud',
|
|
|
|
|
'hostname' => getenv('OBJECT_STORE_HOST') ?: 'localhost',
|
|
|
|
|
'port' => 9000,
|
|
|
|
|
'use_ssl' => false,
|
|
|
|
|
// required for some non amazon s3 implementations
|
|
|
|
|
'use_path_style' => true
|
|
|
|
|
]
|
|
|
|
|
];
|
2023-10-28 19:16:46 -04:00
|
|
|
} elseif (getenv('OBJECT_STORE') === 'azure') {
|
2018-06-04 08:17:49 -04:00
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\Azure',
|
2020-03-26 04:30:18 -04:00
|
|
|
'arguments' => [
|
2018-06-04 08:17:49 -04:00
|
|
|
'container' => 'test',
|
2023-10-28 19:16:46 -04:00
|
|
|
'account_name' => getenv('OBJECT_STORE_KEY') ?: 'devstoreaccount1',
|
|
|
|
|
'account_key' => getenv('OBJECT_STORE_SECRET') ?: 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
|
|
|
|
|
'endpoint' => 'http://' . (getenv('OBJECT_STORE_HOST') ?: 'localhost') . ':10000/' . (getenv('OBJECT_STORE_KEY') ?: 'devstoreaccount1'),
|
2018-06-04 08:17:49 -04:00
|
|
|
'autocreate' => true
|
2020-03-26 04:30:18 -04:00
|
|
|
]
|
2018-06-04 08:17:49 -04:00
|
|
|
];
|
2023-10-28 19:16:46 -04:00
|
|
|
} elseif (getenv('OBJECT_STORE') === 'swift') {
|
|
|
|
|
$swiftHost = getenv('OBJECT_STORE_HOST') ?: 'localhost:5000';
|
|
|
|
|
|
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
|
|
|
|
'arguments' => [
|
|
|
|
|
'autocreate' => true,
|
|
|
|
|
'user' => [
|
|
|
|
|
'name' => getenv('OBJECT_STORE_KEY') ?: 'swift',
|
|
|
|
|
'password' => getenv('OBJECT_STORE_SECRET') ?: 'swift',
|
|
|
|
|
'domain' => [
|
|
|
|
|
'name' => 'Default',
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
'scope' => [
|
|
|
|
|
'project' => [
|
|
|
|
|
'name' => 'service',
|
|
|
|
|
'domain' => [
|
|
|
|
|
'name' => 'Default',
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
'serviceName' => 'service',
|
|
|
|
|
'region' => 'RegionOne',
|
|
|
|
|
'url' => "http://$swiftHost/v3",
|
|
|
|
|
'bucket' => 'nextcloud',
|
|
|
|
|
]
|
|
|
|
|
];
|
2018-06-04 08:17:49 -04:00
|
|
|
}
|
2024-07-18 11:22:02 -04:00
|
|
|
|
|
|
|
|
if (getenv('SHARDING') == '1') {
|
|
|
|
|
$CONFIG['dbsharding'] = [
|
2024-08-28 04:44:18 -04:00
|
|
|
'filecache' => [
|
|
|
|
|
'shards' => [
|
2024-07-18 11:22:02 -04:00
|
|
|
[
|
2024-08-28 04:44:18 -04:00
|
|
|
'port' => 5001,
|
2024-07-18 11:22:02 -04:00
|
|
|
],
|
|
|
|
|
[
|
2024-08-28 04:44:18 -04:00
|
|
|
'port' => 5002,
|
2024-07-18 11:22:02 -04:00
|
|
|
],
|
|
|
|
|
[
|
2024-08-28 04:44:18 -04:00
|
|
|
'port' => 5003,
|
2024-07-18 11:22:02 -04:00
|
|
|
],
|
|
|
|
|
[
|
2024-08-28 04:44:18 -04:00
|
|
|
'port' => 5004,
|
2024-07-18 11:22:02 -04:00
|
|
|
],
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|