Skip to content

Commit

Permalink
Merge pull request #80 from Ouranosinc/env_port
Browse files Browse the repository at this point in the history
MAGPIE_PORT is documented but had no effect
  • Loading branch information
dbyrns authored Jul 4, 2018
2 parents eb3737f + eac98ac commit 5fde2f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions magpie/magpie.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def main(global_config=None, **settings):

print_log('Running configurations setup...')
magpie_url_template = 'http://{hostname}:{port}/magpie'
port = os.getenv('MAGPIE_PORT')
if port:
settings['magpie.port'] = port
hostname = os.getenv('HOSTNAME')
if hostname:
settings['magpie.url'] = magpie_url_template.format(hostname=hostname, port=settings['magpie.port'])
Expand Down

0 comments on commit 5fde2f8

Please sign in to comment.