mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Added appropriate environment configuration for various deploy methods
This commit is contained in:
parent
fa2746b714
commit
4dd9e97d7f
@ -1124,6 +1124,9 @@ class API(object):
|
||||
},
|
||||
}
|
||||
|
||||
if self.apiopts.get('debug', False) == False:
|
||||
conf['global']['environment'] = 'production'
|
||||
|
||||
# Serve static media if the directory has been set in the configuration
|
||||
if 'static' in self.apiopts:
|
||||
conf[self.apiopts.get('static_path', '/static')] = {
|
||||
|
@ -65,6 +65,7 @@ def get_application(*args):
|
||||
|
||||
def wsgi_app(environ, start_response):
|
||||
root, _, conf = opts_tuple or bootstrap_app()
|
||||
cherrypy.config.update({'environment': 'embedded'})
|
||||
|
||||
cherrypy.tree.mount(root, '/', conf)
|
||||
return cherrypy.tree(environ, start_response)
|
||||
|
Loading…
Reference in New Issue
Block a user