From 33e1fd1a84f823650a90bc1b97f8f105dc3e697b Mon Sep 17 00:00:00 2001 From: Seif Ghazi Date: Mon, 4 Aug 2025 22:57:07 -0400 Subject: [PATCH] Update Readme with docker setup with config --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 30739c7..91c5be9 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,13 @@ Claude Code Proxy serves three main purposes: cd claude-code-proxy ``` -2. **Build and run with Docker** +2. **Configure the proxy** + ```bash + cp config.yaml.example config.yaml + # Edit config.yaml as needed + ``` + +3. **Build and run with Docker** ```bash # Build the image docker build -t claude-code-proxy . @@ -73,12 +79,18 @@ Claude Code Proxy serves three main purposes: docker run -p 3001:3001 -p 5173:5173 claude-code-proxy ``` -3. **Run with persistent data and custom configuration** +4. **Run with persistent data and custom configuration** ```bash # Create a data directory for persistent SQLite database mkdir -p ./data - # Run with volume mount and custom environment variables + # Option 1: Run with config file (recommended) + docker run -p 3001:3001 -p 5173:5173 \ + -v ./data:/app/data \ + -v ./config.yaml:/app/config.yaml:ro \ + claude-code-proxy + + # Option 2: Run with environment variables docker run -p 3001:3001 -p 5173:5173 \ -v ./data:/app/data \ -e ANTHROPIC_FORWARD_URL=https://api.anthropic.com \ @@ -87,7 +99,7 @@ Claude Code Proxy serves three main purposes: claude-code-proxy ``` -4. **Docker Compose (alternative)** +5. **Docker Compose (alternative)** ```yaml # docker-compose.yml version: '3.8' @@ -99,6 +111,7 @@ Claude Code Proxy serves three main purposes: - "5173:5173" volumes: - ./data:/app/data + - ./config.yaml:/app/config.yaml:ro # Mount config file environment: - ANTHROPIC_FORWARD_URL=https://api.anthropic.com - PORT=3001