Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (75 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (75 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# OpenClaw Python - Docker Compose Configuration
# Version: 0.6.0
# Compatible with macOS 12.7.6 (Monterey)
version: '3.8'
services:
openclaw:
build:
context: .
dockerfile: Dockerfile
container_name: openclaw-python
hostname: openclaw
# Ports (localhost only for security)
ports:
- "127.0.0.1:8765:8765" # Gateway WebSocket API
# Environment variables
# IMPORTANT: Create a .env file with your API keys
environment:
# LLM API Keys (at least one required)
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
# Telegram Bot (optional)
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
# Discord Bot (optional)
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-}
# Application settings
- OPENCLAW_ENV=${OPENCLAW_ENV:-production}
- OPENCLAW_LOG_LEVEL=${OPENCLAW_LOG_LEVEL:-INFO}
- PYTHONUNBUFFERED=1
# Volumes for persistence
volumes:
# Session data (persistent)
- openclaw-workspace:/app/workspace
# Logs (persistent)
- openclaw-logs:/app/logs
# Optional: Mount .env file for API keys
# - ./.env:/app/.env:ro
# Resource limits (adjust based on your system)
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '0.5'
memory: 1G
# Network
networks:
- openclaw-net
# Restart policy
restart: unless-stopped
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import openclaw; print('OK')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Optional: Web UI (future)
# openclaw-ui:
# image: openclaw/ui:latest
# ports:
# - "127.0.0.1:3000:3000"
# networks:
# - openclaw-net
# depends_on:
# - openclaw
volumes:
openclaw-workspace:
driver: local
openclaw-logs:
driver: local
networks:
openclaw-net:
driver: bridge