about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.env.production.sample8
-rw-r--r--config/initializers/paperclip.rb5
2 files changed, 12 insertions, 1 deletions
diff --git a/.env.production.sample b/.env.production.sample
index 3e054db84..e022a8405 100644
--- a/.env.production.sample
+++ b/.env.production.sample
@@ -101,11 +101,19 @@ SMTP_FROM_ADDRESS=notifications@example.com
 # Swift (optional)
 # SWIFT_ENABLED=true
 # SWIFT_USERNAME=
+# For Keystone V3, the value for SWIFT_TENANT should be the project name
 # SWIFT_TENANT=
 # SWIFT_PASSWORD=
+# Keystone V2 and V3 URLs are supported. Use a V3 URL if possible to avoid
+# issues with token rate-limiting during high load.
 # SWIFT_AUTH_URL=
 # SWIFT_CONTAINER=
 # SWIFT_OBJECT_URL=
+# SWIFT_REGION=
+# Defaults to 'default'
+# SWIFT_DOMAIN_NAME=
+# Defaults to 60 seconds. Set to 0 to disable
+# SWIFT_CACHE_TTL=
 
 # Optional alias for S3 if you want to use Cloudfront or Cloudflare in front
 # S3_CLOUDFRONT_HOST=
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index e9f455251..f27aae7ec 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -47,9 +47,12 @@ elsif ENV['SWIFT_ENABLED'] == 'true'
     fog_credentials: {
       provider: 'OpenStack',
       openstack_username: ENV.fetch('SWIFT_USERNAME'),
-      openstack_tenant: ENV.fetch('SWIFT_TENANT'),
+      openstack_project_name: ENV.fetch('SWIFT_TENANT'),
       openstack_api_key: ENV.fetch('SWIFT_PASSWORD'),
       openstack_auth_url: ENV.fetch('SWIFT_AUTH_URL'),
+      openstack_domain_name: ENV['SWIFT_DOMAIN_NAME'] || 'default',
+      openstack_region: ENV['SWIFT_REGION'],
+      openstack_cache_ttl: ENV['SWIFT_CACHE_TTL'] || 60,
     },
     fog_directory: ENV.fetch('SWIFT_CONTAINER'),
     fog_host: ENV.fetch('SWIFT_OBJECT_URL'),