Skip to content

Commit

Permalink
Set the WEB_PORT by enviroment variable if enviroment variable is pro…
Browse files Browse the repository at this point in the history
…vided.
  • Loading branch information
borntohonk committed Jan 2, 2025
1 parent 4f79d3f commit 307ca91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions medusa/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ def initialize(self, console_logging=True):
except Exception:
app.WEB_PORT = 8081

# attempt override WEB_PORT if enviroment variable is set
try:
app.WEB_PORT = int(os.environ.get('MEDUSA_WEB_PORT'))
except Exception:
pass

if not 21 < app.WEB_PORT < 65535:
app.WEB_PORT = 8081

Expand Down

0 comments on commit 307ca91

Please sign in to comment.