summaryrefslogtreecommitdiffstats
path: root/22.0/fpm/config/swift.config.php
diff options
context:
space:
mode:
Diffstat (limited to '22.0/fpm/config/swift.config.php')
-rw-r--r--22.0/fpm/config/swift.config.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/22.0/fpm/config/swift.config.php b/22.0/fpm/config/swift.config.php
new file mode 100644
index 00000000..47ada566
--- /dev/null
+++ b/22.0/fpm/config/swift.config.php
@@ -0,0 +1,31 @@
+<?php
+if (getenv('OBJECTSTORE_SWIFT_URL')) {
+ $autocreate = getenv('OBJECTSTORE_SWIFT_AUTOCREATE');
+ $CONFIG = array(
+ 'objectstore' => [
+ 'class' => 'OC\\Files\\ObjectStore\\Swift',
+ 'arguments' => [
+ 'autocreate' => $autocreate == true && strtolower($autocreate) !== 'false',
+ 'user' => [
+ 'name' => getenv('OBJECTSTORE_SWIFT_USER_NAME'),
+ 'password' => getenv('OBJECTSTORE_SWIFT_USER_PASSWORD'),
+ 'domain' => [
+ 'name' => (getenv('OBJECTSTORE_SWIFT_USER_DOMAIN')) ?: 'Default',
+ ],
+ ],
+ 'scope' => [
+ 'project' => [
+ 'name' => getenv('OBJECTSTORE_SWIFT_PROJECT_NAME'),
+ 'domain' => [
+ 'name' => (getenv('OBJECTSTORE_SWIFT_PROJECT_DOMAIN')) ?: 'Default',
+ ],
+ ],
+ ],
+ 'serviceName' => (getenv('OBJECTSTORE_SWIFT_SERVICE_NAME')) ?: 'swift',
+ 'region' => getenv('OBJECTSTORE_SWIFT_REGION'),
+ 'url' => getenv('OBJECTSTORE_SWIFT_URL'),
+ 'bucket' => getenv('OBJECTSTORE_SWIFT_CONTAINER_NAME'),
+ ]
+ ]
+ );
+}