diff --git a/.gitignore b/.gitignore index 98675577..53f02213 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,7 @@ AUTHORS ChangeLog # Local settings -local_settings.py +etc/storyboard.conf # IDE settings .idea diff --git a/etc/storyboard.conf b/etc/storyboard.conf.sample similarity index 97% rename from etc/storyboard.conf rename to etc/storyboard.conf.sample index 6d7386fb..1825bd3f 100644 --- a/etc/storyboard.conf +++ b/etc/storyboard.conf.sample @@ -31,7 +31,7 @@ lock_path = $state_path/lock # bind_host = 0.0.0.0 # Port the bind the API server to -# bind_port = 9696 +# bind_port = 8080 [database] # This line MUST be changed to actually run storyboard @@ -72,9 +72,3 @@ lock_path = $state_path/lock # If set, use this value for pool_timeout with sqlalchemy # pool_timeout = 10 - -[api] -#host="0.0.0.0" -# -#port=8080 - diff --git a/storyboard/api/app.py b/storyboard/api/app.py index 05d42646..172a29aa 100644 --- a/storyboard/api/app.py +++ b/storyboard/api/app.py @@ -27,14 +27,14 @@ CONF = cfg.CONF LOG = log.getLogger(__name__) API_OPTS = [ - cfg.StrOpt('host', + cfg.StrOpt('bind_host', default='0.0.0.0', help='API host'), - cfg.IntOpt('port', + cfg.IntOpt('bind_port', default=8080, help='API port') ] -CONF.register_opts(API_OPTS, 'api') +CONF.register_opts(API_OPTS) def get_pecan_config(): @@ -69,8 +69,8 @@ def start(): CONF(project='storyboard') # Create the WSGI server and start it - host = cfg.CONF.api.host - port = cfg.CONF.api.port + host = cfg.CONF.bind_host + port = cfg.CONF.bind_port srv = simple_server.make_server(host, port, root) LOG.info(_('Starting server in PID %s') % os.getpid())