fix: update deployment scripts and resolve backend API communication issue
This commit is contained in:
1 parent
ae023525ec
commit
441560a910
14 files changed
+61
-66
No files matched your search
@@ -169,9 +169,9 @@ def ensure_storage_dir():
|
||||
ensure_storage_dir()
|
||||
|
||||
# Resolve backend ports, falling back to the next free port when defaults are busy.
|
||||
WS_PORT = _resolve_port(("STRIXWEBSSH_WS_PORT", "WEBSSH_WS_PORT"), 8081)
|
||||
HTTP_PORT = _resolve_port(("STRIXWEBSSH_HTTP_PORT", "WEBSSH_HTTP_PORT"), 8082, reserved_ports={WS_PORT})
|
||||
SFTP_WS_PORT = _resolve_port(("STRIXWEBSSH_SFTP_PORT", "WEBSSH_SFTP_PORT"), 8083, reserved_ports={WS_PORT, HTTP_PORT})
|
||||
WS_PORT = _resolve_port(("WEBSSH_WS_PORT",), 8081)
|
||||
HTTP_PORT = _resolve_port(("WEBSSH_HTTP_PORT",), 8082, reserved_ports={WS_PORT})
|
||||
SFTP_WS_PORT = _resolve_port(("WEBSSH_SFTP_PORT",), 8083, reserved_ports={WS_PORT, HTTP_PORT})
|
||||
|
||||
try:
|
||||
with open(PORT_STATE_FILE, "w") as handle:
|
||||
@@ -186,9 +186,9 @@ except Exception as exc:
|
||||
logger.info(f"Resolved backend ports: ws={WS_PORT}, http={HTTP_PORT}, sftp={SFTP_WS_PORT}")
|
||||
|
||||
# User Configuration (username: password_hash)
|
||||
# Set via environment variable: STRIXWEBSSH_USERS=user1:pass1,user2:pass2
|
||||
# Set via environment variable: WEBSSH_USERS=user1:pass1,user2:pass2
|
||||
USERS = {}
|
||||
users_env = os.environ.get("STRIXWEBSSH_USERS", os.environ.get("WEBSSH_USERS", "admin:admin"))
|
||||
users_env = os.environ.get("WEBSSH_USERS", "admin:admin")
|
||||
for user_cred in users_env.split(","):
|
||||
if ":" in user_cred:
|
||||
u, p = user_cred.split(":", 1)
|
||||
|
||||
Reference in new issue
Block a user