Merge pull request #807 from coreos-inc/storage-preference

Enable storage preference
This commit is contained in:
Silas Sewell 2015-11-09 16:30:47 -05:00
commit c739c453da
2 changed files with 6 additions and 3 deletions

7
app.py
View file

@ -75,11 +75,14 @@ else:
config_provider.update_app_config(app.config)
# Update any configuration found in the override environment variable.
OVERRIDE_CONFIG_KEY = 'QUAY_OVERRIDE_CONFIG'
environ_config = json.loads(os.environ.get(OVERRIDE_CONFIG_KEY, '{}'))
app.config.update(environ_config)
# Allow user to define a custom storage preference for the local instance.
_distributed_storage_preference = os.environ.get('QUAY_DISTRIBUTED_STORAGE_PREFERENCE', '').split()
if _distributed_storage_preference:
app.config['DISTRIBUTED_STORAGE_PREFERENCE'] = _distributed_storage_preference
class RequestWithId(Request):
request_gen = staticmethod(urn_generator(['request']))