def load_secret(name, default=None):
    """Check for and load a secret value mounted by Docker in /run/secrets."""
    try:
        with open(f"/run/secrets/{name}") as f:
            return f.read().strip()
    except Exception:
        return default