dev: make the dev-server bind host opt-in via SOULSYNC_WEB_BIND_HOST
The dev gunicorn config hard-bound 127.0.0.1:8008, so the dev server was unreachable from any other device — even via the host's own LAN IP. Read the bind host/port from SOULSYNC_WEB_BIND_HOST / SOULSYNC_WEB_BIND_PORT (same vars the direct web_server.py run already uses), defaulting to the existing 127.0.0.1:8008. Default behavior is unchanged (localhost-only), so other devs notice nothing. To reach the dev server from another device on the LAN, opt in explicitly: SOULSYNC_WEB_BIND_HOST=0.0.0.0 python dev.py
This commit is contained in:
parent
123eb6139f
commit
a8206012ae
1 changed files with 5 additions and 1 deletions
|
|
@ -3,7 +3,11 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
|
|
||||||
bind = "127.0.0.1:8008"
|
# Localhost-only by default (a dev server shouldn't expose itself to the LAN
|
||||||
|
# without asking). To reach it from another device on your network, opt in with
|
||||||
|
# SOULSYNC_WEB_BIND_HOST=0.0.0.0 python dev.py
|
||||||
|
# then browse to http://<this-pc-lan-ip>:8008 (and allow port 8008 in the firewall).
|
||||||
|
bind = f"{os.environ.get('SOULSYNC_WEB_BIND_HOST', '127.0.0.1')}:{os.environ.get('SOULSYNC_WEB_BIND_PORT', '8008')}"
|
||||||
worker_class = "gthread"
|
worker_class = "gthread"
|
||||||
workers = 1
|
workers = 1
|
||||||
threads = 4
|
threads = 4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue