mirror of
https://github.com/pocketpaw/pocketpaw.git
synced 2026-05-13 21:21:53 +00:00
Consolidate documentation from the separate pocketpaw-web repo into the main pocketpaw repo. This keeps docs and code in sync so PRs can update both atomically. - Remove docs/ from .gitignore - Remove docs' own .git (was pocketpaw/pocketpaw-web) - Add .github/workflows/deploy-docs.yml (builds from docs/ subdirectory) - Track all 120+ MDX pages, config, landing page, and public assets The separate pocketpaw-web repo can now be archived. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
153 lines
3.1 KiB
Plaintext
153 lines
3.1 KiB
Plaintext
---
|
|
title: Docker
|
|
description: "Run PocketPaw in Docker with the official Dockerfile and docker-compose configuration. Includes persistent volume mounts for config and memory, environment variable passthrough, and health checks."
|
|
section: Deployment
|
|
ogType: article
|
|
keywords: ["docker", "container", "docker-compose", "dockerfile", "containerized ai"]
|
|
tags: ["deployment", "docker"]
|
|
---
|
|
|
|
# Docker Deployment
|
|
|
|
PocketPaw can be containerized with Docker for easy deployment and isolation.
|
|
|
|
## Dockerfile
|
|
|
|
```dockerfile
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install PocketPaw
|
|
RUN pip install pocketpaw[recommended]
|
|
# Or: RUN curl -fsSL https://pocketpaw.xyz/install.sh | sh
|
|
|
|
# Create data directory
|
|
RUN mkdir -p /root/.pocketclaw
|
|
|
|
# Expose dashboard port
|
|
EXPOSE 8000
|
|
|
|
# Start PocketPaw
|
|
CMD ["pocketpaw"]
|
|
```
|
|
|
|
## Docker Compose
|
|
|
|
```yaml
|
|
version: '3.8'
|
|
|
|
services:
|
|
pocketpaw:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- pocketpaw-data:/root/.pocketclaw
|
|
environment:
|
|
- POCKETCLAW_ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- POCKETCLAW_DASHBOARD_HOST=0.0.0.0
|
|
- POCKETCLAW_DASHBOARD_PORT=8000
|
|
- POCKETCLAW_TOOL_PROFILE=coding
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pocketpaw-data:
|
|
```
|
|
|
|
## With Ollama
|
|
|
|
To use Ollama for local models alongside PocketPaw:
|
|
|
|
```yaml
|
|
version: '3.8'
|
|
|
|
services:
|
|
pocketpaw:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- pocketpaw-data:/root/.pocketclaw
|
|
environment:
|
|
- POCKETCLAW_ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- POCKETCLAW_MEM0_AUTO_LEARN=true
|
|
- POCKETCLAW_MEM0_LLM_PROVIDER=ollama
|
|
- POCKETCLAW_MEM0_LLM_MODEL=llama3.2
|
|
- POCKETCLAW_MEM0_EMBEDDER_PROVIDER=ollama
|
|
- POCKETCLAW_MEM0_EMBEDDER_MODEL=nomic-embed-text
|
|
- OLLAMA_HOST=http://ollama:11434
|
|
depends_on:
|
|
- ollama
|
|
restart: unless-stopped
|
|
|
|
ollama:
|
|
image: ollama/ollama
|
|
volumes:
|
|
- ollama-data:/root/.ollama
|
|
ports:
|
|
- "11434:11434"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pocketpaw-data:
|
|
ollama-data:
|
|
```
|
|
|
|
After starting, pull the required models:
|
|
|
|
```bash
|
|
docker compose exec ollama ollama pull llama3.2
|
|
docker compose exec ollama ollama pull nomic-embed-text
|
|
```
|
|
|
|
## Running
|
|
|
|
```bash
|
|
# Build and start
|
|
docker compose up -d
|
|
|
|
# View logs
|
|
docker compose logs -f pocketpaw
|
|
|
|
# Stop
|
|
docker compose down
|
|
```
|
|
|
|
## Persistent Data
|
|
|
|
Mount the `~/.pocketclaw` directory as a volume to persist:
|
|
- Configuration
|
|
- Session history
|
|
- Memory data
|
|
- OAuth tokens
|
|
- Audit logs
|
|
- MCP server configs
|
|
|
|
## Browser Automation in Docker
|
|
|
|
For browser automation, add Playwright dependencies:
|
|
|
|
```dockerfile
|
|
FROM python:3.11-slim
|
|
|
|
# Install Playwright dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
libnss3 libnspr4 libdbus-1-3 libatk1.0-0 \
|
|
libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 \
|
|
libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
|
|
libasound2 libpango-1.0-0 libcairo2 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install pocketpaw[recommended,browser]
|
|
RUN playwright install chromium
|
|
|
|
EXPOSE 8000
|
|
CMD ["pocketpaw"]
|
|
```
|