This commit is contained in:
+44
-5
@@ -96,10 +96,32 @@ Environment variables:
|
||||
KANBANTE_ZOMBIE_DAYS Days without any activity after
|
||||
which an open card is a "zombie"
|
||||
on /health (issue #9). Default 30.
|
||||
AGENT_URL Base URL of the agent service
|
||||
(panneau Spark + console). Default
|
||||
(official/prod name)
|
||||
https://agent.dracodev.net — the dev
|
||||
environment declares its ``-dev`` name
|
||||
here (e.g. https://agent-dev.dracodev.net).
|
||||
AGENT_EVENEMENTS_URL Journal endpoint of the agent
|
||||
service (Lot 2, contract ACC-0.2)
|
||||
receiving this app's signed events.
|
||||
Default https://agent.dracodev.net/api/v1/evenements.
|
||||
Default: derived from AGENT_URL
|
||||
(``<AGENT_URL>/api/v1/evenements``).
|
||||
KANBANTE_PUBLIC_URL This app's own public base URL
|
||||
(barre commune self-link, SSO
|
||||
``return_to``). Default (official)
|
||||
https://kanbante.dracodev.net.
|
||||
DRACO_FLOWDECK_URL Public base URL of Flowdeck for the
|
||||
common app bar. Default (official)
|
||||
https://flowdeck.dracodev.net.
|
||||
DRACO_TIKTAK_URL Public base URL of TikTak for the
|
||||
common app bar. Default (official)
|
||||
https://tiktak.dracodev.net.
|
||||
ObsiGate's bar link reuses DRACO_SSO_URL
|
||||
(the SSO emitter IS ObsiGate).
|
||||
No public dracodev name is hard-coded
|
||||
outside these defaults: dev/prod differ
|
||||
only by environment, never by code.
|
||||
AGENT_EVENEMENTS_CLE Kanbante's own HMAC key signing the
|
||||
events it emits to that journal (the
|
||||
service knows it as the "kanbante"
|
||||
@@ -113,7 +135,7 @@ from pathlib import Path
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
APP_VERSION = "0.31.1"
|
||||
APP_VERSION = "0.32.0"
|
||||
|
||||
|
||||
def _env_bool(name: str, default: bool) -> bool:
|
||||
@@ -188,6 +210,10 @@ class Settings:
|
||||
draco_secret_prev: str = ""
|
||||
sso_machine_key: str = ""
|
||||
sso_url: str = "https://og.dracodev.net"
|
||||
public_url: str = "https://kanbante.dracodev.net"
|
||||
flowdeck_url: str = "https://flowdeck.dracodev.net"
|
||||
tiktak_url: str = "https://tiktak.dracodev.net"
|
||||
agent_url: str = "https://agent.dracodev.net"
|
||||
archive_suggest_days: int = 180
|
||||
agent_evenements_url: str = "https://agent.dracodev.net/api/v1/evenements"
|
||||
agent_evenements_cle: str = ""
|
||||
@@ -205,6 +231,9 @@ def get_settings() -> Settings:
|
||||
|
||||
def _env_settings() -> Settings:
|
||||
"""Build settings from the current environment only."""
|
||||
agent_url = os.getenv(
|
||||
"AGENT_URL", "https://agent.dracodev.net"
|
||||
).rstrip("/")
|
||||
return Settings(
|
||||
gitea_url=os.getenv("GITEA_URL", "https://git.dracodev.net").rstrip("/"),
|
||||
gitea_token=os.getenv("GITEA_TOKEN", ""),
|
||||
@@ -248,10 +277,20 @@ def _env_settings() -> Settings:
|
||||
draco_secret_prev=os.getenv("DRACO_SESSION_SECRET_PREV", ""),
|
||||
sso_machine_key=os.getenv("DRACO_SSO_MACHINE_KEY", ""),
|
||||
sso_url=os.getenv("DRACO_SSO_URL", "https://og.dracodev.net").rstrip("/"),
|
||||
public_url=os.getenv(
|
||||
"KANBANTE_PUBLIC_URL", "https://kanbante.dracodev.net"
|
||||
).rstrip("/"),
|
||||
flowdeck_url=os.getenv(
|
||||
"DRACO_FLOWDECK_URL", "https://flowdeck.dracodev.net"
|
||||
).rstrip("/"),
|
||||
tiktak_url=os.getenv(
|
||||
"DRACO_TIKTAK_URL", "https://tiktak.dracodev.net"
|
||||
).rstrip("/"),
|
||||
agent_url=agent_url,
|
||||
archive_suggest_days=_env_int("KANBANTE_ARCHIVE_SUGGEST_DAYS", 180),
|
||||
agent_evenements_url=os.getenv(
|
||||
"AGENT_EVENEMENTS_URL",
|
||||
"https://agent.dracodev.net/api/v1/evenements",
|
||||
agent_evenements_url=(
|
||||
os.getenv("AGENT_EVENEMENTS_URL")
|
||||
or f"{agent_url}/api/v1/evenements"
|
||||
).rstrip("/"),
|
||||
agent_evenements_cle=os.getenv("AGENT_EVENEMENTS_CLE", ""),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user