Skip to content

Commit

Permalink
Make SERVER_PORT controllable via environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sarperavci committed Jan 18, 2025
1 parent 49cd6ed commit fef6b91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# Check if running in Docker mode
DOCKER_MODE = os.getenv("DOCKERMODE", "false").lower() == "true"

SERVER_PORT = int(os.getenv("SERVER_PORT", 8000))

# Chromium options arguments
arguments = [
# "--remote-debugging-port=9222", # Add this line for remote debugging
Expand Down Expand Up @@ -142,4 +144,4 @@ def cleanup_display():
else:
log = True

uvicorn.run(app, host="0.0.0.0", port=8000)
uvicorn.run(app, host="0.0.0.0", port=SERVER_PORT)

0 comments on commit fef6b91

Please sign in to comment.