Other config
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
4bcc282a48
commit
fe05ecfd16
|
@ -36,18 +36,36 @@ if (getenv('OBJECT_STORE') === 's3') {
|
||||||
}
|
}
|
||||||
if (getenv('OBJECT_STORE') === 'swift') {
|
if (getenv('OBJECT_STORE') === 'swift') {
|
||||||
$swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
|
$swiftHost = getenv('DRONE') === 'true' ? 'dockswift' : 'localhost';
|
||||||
$auth = getenv('SWIFT-AUTH') === '' ? '2.0' : getenv('SWIFT-AUTH');
|
|
||||||
$CONFIG['objectstore'] = [
|
if (getenv('SWIFT-AUTH') === 'v2.0') {
|
||||||
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
$CONFIG['objectstore'] = [
|
||||||
'arguments' => array(
|
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
||||||
'autocreate' => true,
|
'arguments' => array(
|
||||||
'username' => 'swift',
|
'autocreate' => true,
|
||||||
'tenantName' => 'service',
|
'username' => 'swift',
|
||||||
'password' => 'swift',
|
'tenantName' => 'service',
|
||||||
'serviceName' => 'swift',
|
'password' => 'swift',
|
||||||
'region' => 'regionOne',
|
'serviceName' => 'swift',
|
||||||
'url' => "http://$swiftHost:5000/$auth",
|
'region' => 'regionOne',
|
||||||
'bucket' => 'nextcloud'
|
'url' => "http://$swiftHost:5000/v2.0",
|
||||||
)
|
'bucket' => 'nextcloud'
|
||||||
];
|
)
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$CONFIG['objectstore'] = [
|
||||||
|
'class' => 'OC\\Files\\ObjectStore\\Swift',
|
||||||
|
'arguments' => array(
|
||||||
|
'autocreate' => true,
|
||||||
|
'user' => [
|
||||||
|
'id' => 'swift',
|
||||||
|
],
|
||||||
|
'tenantName' => 'service',
|
||||||
|
'password' => 'swift',
|
||||||
|
'serviceName' => 'swift',
|
||||||
|
'region' => 'regionOne',
|
||||||
|
'url' => "http://$swiftHost:5000/v3",
|
||||||
|
'bucket' => 'nextcloud'
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue