Portal server mode for Dokploy: Dockerfile, PORTAL_URLS, PORTAL_SERVER
The results Portal in a Linux container (python 3.13-slim + ODBC Driver 18). PORTAL_SERVER=1: no Start / Stop (the bot runs on the Windows PC). PORTAL_URLS: allowed hosts / origins, Secure cookie when all https. RESULTS_DB_CONN (a SQL login) goes in Dokploy's environment, never here. 71 test files, 1222 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ce9bdbd974
commit
c049cece23
9 files changed
+163
-13
No files matched your search
@@ -50,6 +50,23 @@ class StopFailed(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class NoRunner:
|
||||
"""The Portal on a server (Dokploy, 2026-10-27): the bot runs only on
|
||||
the Windows PC, so nothing here ever starts, stops or looks for it."""
|
||||
|
||||
def start(self, started_by: str = "") -> dict:
|
||||
raise NotRunning("Runs start on the bot PC, not from this server")
|
||||
|
||||
def stop(self, stopped_by: str = "") -> dict:
|
||||
raise NotRunning("Runs start on the bot PC, not from this server")
|
||||
|
||||
def status(self) -> dict:
|
||||
return {"running": False, "starting": False, "pid": None,
|
||||
"started_at": None, "ended_at": None, "exit_code": None,
|
||||
"stopped_by_operator": False, "source": None,
|
||||
"started_by": None, "log_path": None, "out_path": None}
|
||||
|
||||
|
||||
class BotRunner:
|
||||
# How long stop() waits for a killed process to be gone.
|
||||
stop_wait = 10.0
|
||||
|
||||
Reference in new issue
Block a user