From 071461dc82e0699329b56c06b0076a7d6e3bacf3 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Fri, 13 Mar 2026 10:30:40 -0400 Subject: [PATCH] feat: Set up application configuration using pydantic-settings and .env files. --- Dockerfile | 16 ++++++++++++++-- backend/.env.example | 2 +- backend/app/config.py | 2 +- docker-compose.yml | 3 +++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 80a3994..a613155 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,15 +26,27 @@ LABEL maintainer="Bruno Charest " LABEL description="🦊 Foxy Dev Team — Multi-Agent Orchestration System" LABEL version="2.0.0" -# System deps +# System deps (CLI tools, Node.js, Git) RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ + git \ + ca-certificates \ + gnupg \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update && apt-get install -y nodejs \ + && npm install -g openclaw@latest \ && rm -rf /var/lib/apt/lists/* # Create non-root user RUN useradd --create-home --shell /bin/bash foxy WORKDIR /app -RUN chown foxy:foxy /app + +# Setup OpenClaw environment within the container +RUN mkdir -p /home/foxy/.openclaw/workspace /home/foxy/.openclaw/logs \ + && chown -R foxy:foxy /home/foxy/.openclaw \ + && chown foxy:foxy /app # Python dependencies COPY --chown=foxy:foxy backend/requirements.txt ./ diff --git a/backend/.env.example b/backend/.env.example index ce5ad58..e51ecda 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -6,7 +6,7 @@ TELEGRAM_BOT_TOKEN=your-telegram-bot-token TELEGRAM_CHAT_ID=your-chat-id # ─── OpenClaw ────────────────────────────────────────────── -OPENCLAW_WORKSPACE=/home/openclaw/.openclaw/workspace +OPENCLAW_WORKSPACE=/home/foxy/.openclaw/workspace # ─── Gitea ───────────────────────────────────────────────── GITEA_SERVER=https://gitea.your.server diff --git a/backend/app/config.py b/backend/app/config.py index 4e61ad3..8ea7929 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -16,7 +16,7 @@ class Settings(BaseSettings): TELEGRAM_CHAT_ID: str = "" # OpenClaw - OPENCLAW_WORKSPACE: str = "/home/openclaw/.openclaw/workspace" + OPENCLAW_WORKSPACE: str = "/home/foxy/.openclaw/workspace" # Gitea GITEA_SERVER: str = "" diff --git a/docker-compose.yml b/docker-compose.yml index 81602ad..e1683a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,7 @@ services: - backend/.env volumes: - foxy-data:/app/data + - foxy-workspace:/home/foxy/.openclaw/workspace healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7000/api/health"] interval: 30s @@ -59,6 +60,8 @@ services: volumes: foxy-data: driver: local + foxy-workspace: + driver: local networks: foxy-net: