this repo has no description
1networks:
2 assistant-net:
3 driver: bridge
4
5services:
6 # anthropic-proxy: OAuth proxy for Anthropic API
7 # Internal only - accessed by auth-adapter via Docker network
8 # For OAuth setup, use SSH tunnel: ssh -L 4001:localhost:4001 root@SERVER
9 anthropic-proxy:
10 build:
11 context: .
12 dockerfile: Dockerfile.anthropic-proxy
13 # No external port exposure - internal Docker network only
14 environment:
15 - PORT=4001
16 - SESSION_SECRET=${ANTHROPIC_PROXY_SESSION_SECRET}
17 - CLIENT_ID=9d1c250a-e61b-44d9-88ed-5944d1962f5e
18 - REDIRECT_URI=https://console.anthropic.com/oauth/code/callback
19 - OAUTH_BASE_URL=https://claude.ai
20 - API_BASE_URL=https://api.anthropic.com/v1
21 volumes:
22 - anthropic-proxy-data:/root/.local/share/anthropic-proxy
23 networks:
24 - assistant-net
25 restart: unless-stopped
26 healthcheck:
27 test: ['CMD', 'curl', '-f', 'http://localhost:4001/health']
28 interval: 30s
29 start_period: 10s
30 start_interval: 2s
31 timeout: 10s
32 retries: 3
33
34 # Auth adapter: translates Bearer tokens to x-api-key headers
35 # LiteLLM's os.environ/ substitution doesn't work in extra_headers
36 # Internal only - accessed by LiteLLM via Docker network
37 auth-adapter:
38 image: oven/bun:latest
39 working_dir: /app
40 command: ['bun', 'run', 'src/auth-adapter.ts']
41 # No external port exposure - internal Docker network only
42 environment:
43 - ANTHROPIC_PROXY_INTERNAL_URL=http://anthropic-proxy:4001
44 - AUTH_ADAPTER_PORT=4002
45 volumes:
46 - ./src/auth-adapter.ts:/app/src/auth-adapter.ts:ro
47 networks:
48 - assistant-net
49 restart: unless-stopped
50 depends_on:
51 anthropic-proxy:
52 condition: service_healthy
53 healthcheck:
54 test: ['CMD', 'bun', '-e', "fetch('http://localhost:4002/health').then(r => process.exit(r.ok ? 0 : 1))"]
55 interval: 30s
56 start_period: 10s
57 start_interval: 2s
58 timeout: 10s
59 retries: 3
60
61 # LiteLLM: OpenAI-compatible API that proxies to auth-adapter -> anthropic-proxy
62 # Internal only - accessed by Letta and app via Docker network
63 litellm:
64 # Using specific version that includes fix for tools=None bug
65 # https://github.com/BerriAI/litellm/commit/7c2e2111c0cc3372ca0ce911d0b6d45c22794d7f
66 image: ghcr.io/berriai/litellm:litellm_embedding_header_forwarding-v1.80.9.dev6
67 # No external port exposure - internal Docker network only
68 env_file: .env
69 volumes:
70 - ./litellm-config.yaml:/app/config.yaml:ro
71 command: ['--config', '/app/config.yaml', '--port', '4000']
72 networks:
73 - assistant-net
74 restart: unless-stopped
75 depends_on:
76 auth-adapter:
77 condition: service_healthy
78 healthcheck:
79 test: ['CMD', 'python', '-c', "import urllib.request; urllib.request.urlopen('http://localhost:4000/health')"]
80 interval: 30s
81 start_period: 10s
82 start_interval: 2s
83 timeout: 10s
84 retries: 3
85
86 # Letta: Agent framework with memory
87 # Access via Tailscale: http://TAILSCALE_IP:8283
88 # Or via Caddy (if configured): https://letta.yourdomain.com
89 letta:
90 image: letta/letta:latest
91 ports:
92 - '8283:8283'
93 environment:
94 # Use LiteLLM as OpenAI-compatible endpoint for Claude models
95 - OPENAI_API_BASE=http://litellm:4000
96 - OPENAI_API_KEY=${ANTHROPIC_PROXY_SESSION_ID}
97 # Password protection for remote access via Letta Cloud ADE
98 - SECURE=${LETTA_SERVER_PASSWORD:+true}
99 - LETTA_SERVER_PASSWORD=${LETTA_SERVER_PASSWORD:-}
100 volumes:
101 - letta-data:/var/lib/postgresql/data
102 networks:
103 - assistant-net
104 restart: unless-stopped
105 depends_on:
106 litellm:
107 condition: service_healthy
108 healthcheck:
109 test: ['CMD', 'curl', '-f', 'http://localhost:8283/v1/health']
110 interval: 30s
111 start_period: 30s
112 start_interval: 2s
113 timeout: 10s
114 retries: 3
115
116volumes:
117 letta-data:
118 anthropic-proxy-data: