From 27fa63631afc9008580c59ba3f20be96506135b4 Mon Sep 17 00:00:00 2001 From: baramgay Date: Thu, 11 Jun 2026 22:54:28 +0900 Subject: [PATCH] feat: add Docker Compose setup for zero-dependency install (closes #3) - Dockerfile: python:3.11-slim, core deps only (skips win10toast/chromadb) - docker-compose.yml: single service, port 8000, volume mounts for agents/wiki/data files - README: add Docker Quick Start section at top of installation guide Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 30 ++++++++++++++++++++++++++++++ README.md | 30 ++++++++++++++++++++++++------ docker-compose.yml | 19 +++++++++++++++++++ 3 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d96d01d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM python:3.11-slim + +WORKDIR /app + +# Install core dependencies only. +# win10toast is Windows-only; chromadb/sentence-transformers are heavy optional deps +# that require a running ChromaDB instance — omit for zero-dependency startup. +RUN pip install --no-cache-dir \ + "fastapi>=0.110.0" \ + "uvicorn[standard]>=0.27.0" \ + "pydantic>=2.0.0" \ + "openai>=1.0.0" \ + "python-dotenv>=1.0.0" \ + "websockets" + +# Copy application code and static assets +COPY scripts/ ./scripts/ +COPY agents/ ./agents/ +COPY wiki/ ./wiki/ +COPY index.html metaverse.html favicon.svg ./ + +# Copy data files (overridden by volume mounts in production) +COPY agent_status.json issues.json projects.json ./ + +# AGENTS_HOME points to the working directory so scripts resolve paths correctly +ENV AGENTS_HOME=/app + +EXPOSE 8000 + +CMD ["python", "scripts/api_server.py"] diff --git a/README.md b/README.md index f5475dd..7acc4dc 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,32 @@ Stop juggling multiple AI sessions. agentops gives Claude Code a **persistent ch ## 🚀 Quick Start -### 1. Clone & set up +### 🐳 Docker — zero-dependency (recommended) + +No Python install required: + +```bash +git clone https://github.com/baramgay/agentops.git +cd agentops +cp .env.example .env # optional: fill in OPENAI_API_KEY for LLM features +docker compose up +# Dashboard → http://localhost:8000 +``` + +> `agents/`, `wiki/`, `issues.json`, `agent_status.json`, and `projects.json` are mounted as volumes — edits on the host are reflected live and state persists across restarts. + +--- + +### Manual setup + +#### 1. Clone & set up ```bash -git clone https://github.com/your-github-username/agentops.git +git clone https://github.com/baramgay/agentops.git cd agentops ``` -### 2. Set the home path +#### 2. Set the home path **Windows (PowerShell)**: ```powershell @@ -52,21 +70,21 @@ echo 'export AGENTS_HOME="$HOME/agentops"' >> ~/.bashrc source ~/.bashrc ``` -### 3. Install dependencies & initialize +#### 3. Install dependencies & initialize ```bash pip install -r requirements.txt python scripts/setup.py ``` -### 4. Start the server +#### 4. Start the server ```bash python scripts/api_server.py # Dashboard → http://localhost:8000 ``` -### 5. Add to your Claude Code project +#### 5. Add to your Claude Code project Copy `CLAUDE.md` into your project root (or merge with your existing one) and configure the `AGENTS_HOME` path. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8186c0b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +services: + api: + build: . + ports: + - "8000:8000" + volumes: + # Live-editable: changes on the host are reflected immediately + - ./agents:/app/agents + - ./wiki:/app/wiki + # Persistent data files: state survives container restarts + - ./issues.json:/app/issues.json + - ./agent_status.json:/app/agent_status.json + - ./projects.json:/app/projects.json + environment: + - AGENTS_HOME=/app + env_file: + - path: .env + required: false # copy .env.example → .env to enable LLM features + restart: unless-stopped