Add a sample config file
storyboard.conf added to .gitignore api section remove from config. To configure API host and port use bind_host and bind_port in default section. Change-Id: I2e2686faa063e1182e37f2bf869d0cd7d54ef352
This commit is contained in:
parent
b02a396f3b
commit
ba3d6c98e5
2
.gitignore
vendored
2
.gitignore
vendored
@ -56,7 +56,7 @@ AUTHORS
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
|
|
||||||
# Local settings
|
# Local settings
|
||||||
local_settings.py
|
etc/storyboard.conf
|
||||||
|
|
||||||
# IDE settings
|
# IDE settings
|
||||||
.idea
|
.idea
|
||||||
|
@ -31,7 +31,7 @@ lock_path = $state_path/lock
|
|||||||
# bind_host = 0.0.0.0
|
# bind_host = 0.0.0.0
|
||||||
|
|
||||||
# Port the bind the API server to
|
# Port the bind the API server to
|
||||||
# bind_port = 9696
|
# bind_port = 8080
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
# This line MUST be changed to actually run storyboard
|
# 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
|
# If set, use this value for pool_timeout with sqlalchemy
|
||||||
# pool_timeout = 10
|
# pool_timeout = 10
|
||||||
|
|
||||||
[api]
|
|
||||||
#host="0.0.0.0"
|
|
||||||
#
|
|
||||||
#port=8080
|
|
||||||
|
|
@ -27,14 +27,14 @@ CONF = cfg.CONF
|
|||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
API_OPTS = [
|
API_OPTS = [
|
||||||
cfg.StrOpt('host',
|
cfg.StrOpt('bind_host',
|
||||||
default='0.0.0.0',
|
default='0.0.0.0',
|
||||||
help='API host'),
|
help='API host'),
|
||||||
cfg.IntOpt('port',
|
cfg.IntOpt('bind_port',
|
||||||
default=8080,
|
default=8080,
|
||||||
help='API port')
|
help='API port')
|
||||||
]
|
]
|
||||||
CONF.register_opts(API_OPTS, 'api')
|
CONF.register_opts(API_OPTS)
|
||||||
|
|
||||||
|
|
||||||
def get_pecan_config():
|
def get_pecan_config():
|
||||||
@ -69,8 +69,8 @@ def start():
|
|||||||
CONF(project='storyboard')
|
CONF(project='storyboard')
|
||||||
|
|
||||||
# Create the WSGI server and start it
|
# Create the WSGI server and start it
|
||||||
host = cfg.CONF.api.host
|
host = cfg.CONF.bind_host
|
||||||
port = cfg.CONF.api.port
|
port = cfg.CONF.bind_port
|
||||||
srv = simple_server.make_server(host, port, root)
|
srv = simple_server.make_server(host, port, root)
|
||||||
|
|
||||||
LOG.info(_('Starting server in PID %s') % os.getpid())
|
LOG.info(_('Starting server in PID %s') % os.getpid())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user