forked from bikramgupta/openclaw-cattle-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (91 loc) · 3.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
102 lines (91 loc) · 3.22 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
93
94
95
96
97
98
99
100
101
102
services:
rustfs-init:
image: busybox:1.36
command: ["sh", "-c", "mkdir -p /data && chown -R 10001:10001 /data"]
volumes:
- rustfs-data:/data
rustfs:
# RustFS (S3-compatible local object store) for V0 dev restore/backup
image: ${RUSTFS_IMAGE:-rustfs/rustfs:1.0.0-alpha.82}
depends_on:
rustfs-init:
condition: service_completed_successfully
environment:
RUSTFS_ACCESS_KEY: ${SPACES_ACCESS_KEY_ID:-rustfsadmin}
RUSTFS_SECRET_KEY: ${SPACES_SECRET_ACCESS_KEY:-rustfsadmin}
command: ["--console-enable", "/data"]
ports:
- "9000:9000"
- "9001:9001"
volumes:
- rustfs-data:/data
rustfs-bucket:
image: amazon/aws-cli:2.15.57
depends_on:
- rustfs
environment:
AWS_ACCESS_KEY_ID: ${SPACES_ACCESS_KEY_ID:-rustfsadmin}
AWS_SECRET_ACCESS_KEY: ${SPACES_SECRET_ACCESS_KEY:-rustfsadmin}
AWS_DEFAULT_REGION: ${SPACES_REGION:-us-east-1}
AWS_EC2_METADATA_DISABLED: "true"
SPACES_BUCKET: ${SPACES_BUCKET:-openclaw-dev}
entrypoint: ["/bin/sh", "-c"]
command:
- |
set -e
endpoint="$${S3_ENDPOINT_URL:-http://rustfs:9000}"
bucket="$${SPACES_BUCKET:-openclaw-dev}"
for i in $(seq 1 60); do
if aws --endpoint-url "$$endpoint" s3 ls >/dev/null 2>&1; then
# If bucket already exists, we're done.
if aws --endpoint-url "$$endpoint" s3 ls "s3://$$bucket/" >/dev/null 2>&1; then
exit 0
fi
# Otherwise attempt to create it; if it succeeds, we're done.
if aws --endpoint-url "$$endpoint" s3 mb "s3://$$bucket" >/dev/null 2>&1; then
exit 0
fi
fi
sleep 1
done
echo "rustfs endpoint not ready: $$endpoint" >&2
exit 1
openclaw-agent:
build:
context: ./openclaw-agent-image
depends_on:
rustfs-bucket:
condition: service_completed_successfully
environment:
# Telegram-first (required)
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
TELEGRAM_ALLOWFROM: ${TELEGRAM_ALLOWFROM:-}
# WhatsApp (personal number)
WHATSAPP_ALLOWFROM: ${WHATSAPP_ALLOWFROM:-}
# Skills
OPENCLAW_SKILLS: ${OPENCLAW_SKILLS:-}
# Providers
GRADIENT_API_KEY: ${GRADIENT_API_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
AGENT_DEFAULT_MODEL: ${AGENT_DEFAULT_MODEL:-}
# Identity + gateway auth
AGENT_ID: ${AGENT_ID:-agent-dev}
AGENT_NAME: ${AGENT_NAME:-OpenClaw Dev Agent}
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
# Object store (RustFS local)
SPACES_BUCKET: ${SPACES_BUCKET:-openclaw-dev}
SPACES_REGION: ${SPACES_REGION:-us-east-1}
SPACES_ACCESS_KEY_ID: ${SPACES_ACCESS_KEY_ID:-rustfsadmin}
SPACES_SECRET_ACCESS_KEY: ${SPACES_SECRET_ACCESS_KEY:-rustfsadmin}
S3_ENDPOINT_URL: ${S3_ENDPOINT_URL:-http://rustfs:9000}
# Runtime paths (authoritative)
OPENCLAW_STATE_DIR: /home/openclaw/.openclaw
OPENCLAW_CONFIG_PATH: /run/openclaw/openclaw.json
tmpfs:
- /run/openclaw:mode=0700,uid=10001,gid=10001
ports:
- "18789:18789"
restart: unless-stopped
volumes:
rustfs-data: