Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lelandweathers committed Apr 7, 2018
1 parent 19bb040 commit 4478871
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions tabpy-server/tabpy_server/common/config.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ TABPY_QUERY_OBJECT_PATH = '/tmp/query_objects'
TABPY_PORT = 9004
TABPY_SERVER_VERSION = 'Alpha'
TABPY_STATE_PATH = './'
TABPY_BIND_IP = '0.0.0.0'
9 changes: 7 additions & 2 deletions tabpy-server/tabpy_server/tabpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,11 @@ def get_config():
except AttributeError:
settings['server_version'] = os.getenv('TABPY_SERVER_VERSION', 'Alpha')

try:
settings['bind_ip'] = config.TABPY_BIND_IP
except AttributeError:
settings['bind_ip'] = os.getenv('TABPY_BIND_IP', '0.0.0.0')

try:
settings['upload_dir'] = config.TABPY_QUERY_OBJECT_PATH
except AttributeError:
Expand Down Expand Up @@ -800,8 +805,8 @@ def main():

init_model_evaluator(settings)

application.listen(settings['port'])
print('Web service listening on port ' + str(settings['port']))
application.listen(settings['port'], address=settings['bind_ip'])
print('Web service listening on {} port {}'.format(settings['bind_ip'], str(settings['port'])))
tornado.ioloop.IOLoop.instance().start()

if __name__ == '__main__':
Expand Down

0 comments on commit 4478871

Please sign in to comment.