feat: Add API endpoints and UI for managing application settings, deploy servers, and Git servers.
This commit is contained in:
@@ -6,10 +6,10 @@ TELEGRAM_BOT_TOKEN=your-telegram-bot-token
|
||||
TELEGRAM_CHAT_ID=your-chat-id
|
||||
|
||||
# ─── OpenClaw ──────────────────────────────────────────────
|
||||
# Path on the HOST (where openclaw workspace is stored)
|
||||
OPENCLAW_WORKSPACE=/home/openclaw/.openclaw/workspace
|
||||
# Path in the CONTAINER (keep as is)
|
||||
FOXY_WORKSPACE=/home/foxy/.openclaw/workspace
|
||||
# Root path on the HOST (contains agents/, workspace/, config.json)
|
||||
OPENCLAW_HOME=/home/openclaw/.openclaw
|
||||
# Root path in the CONTAINER (keep as is)
|
||||
FOXY_HOME=/home/foxy/.openclaw
|
||||
|
||||
# ─── Gitea ─────────────────────────────────────────────────
|
||||
GITEA_SERVER=https://gitea.your.server
|
||||
|
||||
@@ -16,6 +16,7 @@ class Settings(BaseSettings):
|
||||
TELEGRAM_CHAT_ID: str = ""
|
||||
|
||||
# OpenClaw
|
||||
FOXY_HOME: str = "/home/foxy/.openclaw"
|
||||
FOXY_WORKSPACE: str = "/home/foxy/.openclaw/workspace"
|
||||
|
||||
# Gitea
|
||||
|
||||
@@ -27,6 +27,7 @@ router = APIRouter(prefix="/api/config", tags=["config"])
|
||||
async def get_config():
|
||||
"""Get current configuration (secrets masked)."""
|
||||
return ConfigResponse(
|
||||
FOXY_HOME=settings.FOXY_HOME,
|
||||
FOXY_WORKSPACE=settings.FOXY_WORKSPACE,
|
||||
GITEA_SERVER=settings.GITEA_SERVER,
|
||||
DEPLOYMENT_SERVER=settings.DEPLOYMENT_SERVER,
|
||||
|
||||
@@ -218,6 +218,7 @@ class AgentStatus(BaseModel):
|
||||
|
||||
|
||||
class ConfigResponse(BaseModel):
|
||||
FOXY_HOME: str
|
||||
FOXY_WORKSPACE: str
|
||||
GITEA_SERVER: str
|
||||
DEPLOYMENT_SERVER: str
|
||||
@@ -231,6 +232,7 @@ class ConfigResponse(BaseModel):
|
||||
|
||||
|
||||
class ConfigUpdate(BaseModel):
|
||||
FOXY_HOME: Optional[str] = None
|
||||
FOXY_WORKSPACE: Optional[str] = None
|
||||
GITEA_SERVER: Optional[str] = None
|
||||
DEPLOYMENT_SERVER: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user