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
@@ -21,7 +21,10 @@ import os
|
||||
import time
|
||||
import json
|
||||
import ctypes
|
||||
from ctypes import wintypes
|
||||
try:
|
||||
from ctypes import wintypes
|
||||
except ValueError: # some non-Windows Pythons; the server Portal
|
||||
wintypes = None # (PORTAL_SERVER=1) never calls the kernel32 parts
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from .. import settings as cfg
|
||||
|
||||
@@ -688,6 +688,13 @@ RESULTS_DB_CONN = _env(
|
||||
"DATABASE=Charge_Validation;Trusted_Connection=yes;"
|
||||
"TrustServerCertificate=yes;")
|
||||
|
||||
# The Portal on a server (Dokploy, 2026-10-27). PORTAL_URLS: the address(es)
|
||||
# people type, comma separated (e.g. https://cv.example.com); empty = this
|
||||
# PC only (127.0.0.1:8000). PORTAL_SERVER=1: no Start / Stop — the bot runs
|
||||
# only on the Windows PC.
|
||||
PORTAL_URLS = _env("PORTAL_URLS")
|
||||
PORTAL_SERVER = _env_bool("PORTAL_SERVER", False)
|
||||
|
||||
# eCW builds the file server-side over a wide date range, so this is generous.
|
||||
DOWNLOAD_TIMEOUT = _env_int("DOWNLOAD_TIMEOUT_MS", 300_000) # 5 min
|
||||
|
||||
|
||||
Reference in new issue
Block a user