2012-10-27 13:22:00 +04:00
|
|
|
<?php
|
2020-04-09 12:50:14 +03:00
|
|
|
|
2015-03-19 11:07:29 +03:00
|
|
|
$CONFIG = [
|
|
|
|
'appstoreenabled' => false,
|
|
|
|
'apps_paths' => [
|
|
|
|
[
|
|
|
|
'path' => OC::$SERVERROOT . '/apps',
|
|
|
|
'url' => '/apps',
|
|
|
|
'writable' => true,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|
2013-10-15 02:29:47 +04:00
|
|
|
|
2015-03-19 11:07:29 +03:00
|
|
|
if (is_dir(OC::$SERVERROOT.'/apps2')) {
|
|
|
|
$CONFIG['apps_paths'][] = [
|
|
|
|
'path' => OC::$SERVERROOT . '/apps2',
|
|
|
|
'url' => '/apps2',
|
|
|
|
'writable' => false,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2016-11-16 14:43:38 +03:00
|
|
|
if (getenv('OBJECT_STORE') === 's3') {
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\S3',
|
2020-03-26 11:30:18 +03:00
|
|
|
'arguments' => [
|
2016-11-16 14:43:38 +03:00
|
|
|
'bucket' => 'nextcloud',
|
|
|
|
'autocreate' => true,
|
|
|
|
'key' => 'dummy',
|
|
|
|
'secret' => 'dummy',
|
2017-08-17 10:40:12 +03:00
|
|
|
'hostname' => getenv('DRONE') === 'true' ? 'fake-s3' : 'localhost',
|
2016-11-16 14:43:38 +03:00
|
|
|
'port' => 4569,
|
|
|
|
'use_ssl' => false,
|
|
|
|
// required for some non amazon s3 implementations
|
|
|
|
'use_path_style' => true
|
2020-03-26 11:30:18 +03:00
|
|
|
]
|
2016-11-16 14:43:38 +03:00
|
|
|
];
|
|
|
|
}
|
2018-02-07 19:16:54 +03:00
|
|
|
if (getenv('OBJECT_STORE') === 'swift') {
|
|
|
|
$swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
|
2018-02-21 17:09:41 +03:00
|
|
|
|
|
|
|
if (getenv('SWIFT-AUTH') === 'v2.0') {
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
2020-03-26 11:30:18 +03:00
|
|
|
'arguments' => [
|
2018-02-21 17:09:41 +03:00
|
|
|
'autocreate' => true,
|
|
|
|
'username' => 'swift',
|
|
|
|
'tenantName' => 'service',
|
|
|
|
'password' => 'swift',
|
|
|
|
'serviceName' => 'swift',
|
|
|
|
'region' => 'regionOne',
|
|
|
|
'url' => "http://$swiftHost:5000/v2.0",
|
|
|
|
'bucket' => 'nextcloud'
|
2020-03-26 11:30:18 +03:00
|
|
|
]
|
2018-02-21 17:09:41 +03:00
|
|
|
];
|
|
|
|
} else {
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
2020-03-26 11:30:18 +03:00
|
|
|
'arguments' => [
|
2018-02-21 17:09:41 +03:00
|
|
|
'autocreate' => true,
|
|
|
|
'user' => [
|
2018-02-21 18:27:11 +03:00
|
|
|
'name' => 'swift',
|
|
|
|
'password' => 'swift',
|
|
|
|
'domain' => [
|
|
|
|
'name' => 'default',
|
|
|
|
]
|
2018-02-21 17:09:41 +03:00
|
|
|
],
|
2018-12-18 16:27:29 +03:00
|
|
|
'scope' => [
|
|
|
|
'project' => [
|
|
|
|
'name' => 'service',
|
|
|
|
'domain' => [
|
|
|
|
'name' => 'default',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2018-02-21 17:09:41 +03:00
|
|
|
'tenantName' => 'service',
|
|
|
|
'serviceName' => 'swift',
|
|
|
|
'region' => 'regionOne',
|
|
|
|
'url' => "http://$swiftHost:5000/v3",
|
|
|
|
'bucket' => 'nextcloud'
|
2020-03-26 11:30:18 +03:00
|
|
|
]
|
2018-02-21 17:09:41 +03:00
|
|
|
];
|
|
|
|
}
|
2018-02-07 19:16:54 +03:00
|
|
|
}
|
2018-06-04 15:17:49 +03:00
|
|
|
if (getenv('OBJECT_STORE') === 'azure') {
|
|
|
|
$CONFIG['objectstore'] = [
|
|
|
|
'class' => 'OC\\Files\\ObjectStore\\Azure',
|
2020-03-26 11:30:18 +03:00
|
|
|
'arguments' => [
|
2018-06-04 15:17:49 +03:00
|
|
|
'container' => 'test',
|
|
|
|
'account_name' => 'devstoreaccount1',
|
|
|
|
'account_key' => 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==',
|
|
|
|
'endpoint' => 'http://' . (getenv('DRONE') === 'true' ? 'azurite' : 'localhost') . ':10000/devstoreaccount1',
|
|
|
|
'autocreate' => true
|
2020-03-26 11:30:18 +03:00
|
|
|
]
|
2018-06-04 15:17:49 +03:00
|
|
|
];
|
|
|
|
}
|