diff --git a/services/telegram_bot/config.py b/services/telegram_bot/config.py index 457174b..dd9a2dd 100644 --- a/services/telegram_bot/config.py +++ b/services/telegram_bot/config.py @@ -11,7 +11,7 @@ import os TELEGRAM_BOT_TOKEN = os.environ.get("TELEGRAM_BOT_TOKEN", "") # Paths -NOTIFICATIONS_DIR = "/data/notifications" +NOTIFICATIONS_DIR = os.path.join(os.environ.get("DATA_DIR", "/data"), "notifications") TELEGRAM_USERS_FILE = os.path.join(NOTIFICATIONS_DIR, "telegram_users.json") PENDING_CODES_FILE = os.path.join(NOTIFICATIONS_DIR, "pending_codes.json") BOT_LOG_FILE = os.path.join(NOTIFICATIONS_DIR, "bot.log") diff --git a/services/telegram_bot/dispatch.py b/services/telegram_bot/dispatch.py index 6e5230b..596a28e 100644 --- a/services/telegram_bot/dispatch.py +++ b/services/telegram_bot/dispatch.py @@ -14,7 +14,7 @@ from . import config logger = logging.getLogger(__name__) -WS_GATEWAY_SOCKET_PATH = "/run/ws-gateway/ws.sock" +WS_GATEWAY_SOCKET_PATH = os.environ.get("WS_GATEWAY_SOCKET", "/run/ws-gateway/ws.sock") def dispatch_to_ws_gateway(username: str, output: dict, script_name: str) -> None: diff --git a/src/profiler.py b/src/profiler.py index 8ee92eb..0cda5f7 100644 --- a/src/profiler.py +++ b/src/profiler.py @@ -84,7 +84,7 @@ ALERT_ZEROS_PCT = 50.0 # Not in config (rarely needed) ALERT_HIGH_CARDINALITY = _cfg["alert_high_cardinality"] # Paths - configurable via environment or defaults for server -DATA_DIR = Path(os.environ.get("PROFILER_DATA_DIR", "/data/src_data")) +DATA_DIR = Path(os.environ.get("DATA_DIR", "/data")) / "src_data" DOCS_DIR = Path(os.environ.get("PROFILER_DOCS_DIR", str(Path(__file__).parent.parent / "docs"))) PARQUET_DIR = DATA_DIR / "parquet" METADATA_DIR = DATA_DIR / "metadata"