-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (100 loc) · 2.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (100 loc) · 2.59 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
103
104
105
106
107
version: "3.9"
services:
openclaw:
image: alpine/openclaw:main
container_name: openclaw
ports:
- "18789:18789"
volumes:
- .:/workspace
environment:
- OPENCLAW_HOME=/workspace
- MINIMAX_API_KEY=${MINIMAX_API_KEY}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=openclaw
- POSTGRES_USER=openclaw
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-openclaw_pass}
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
networks:
- openclaw_net
postgres:
image: postgres:15-alpine
container_name: openclaw_postgres
environment:
- POSTGRES_DB=openclaw
- POSTGRES_USER=openclaw
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-openclaw_pass}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openclaw"]
interval: 5s
timeout: 5s
retries: 5
networks:
- openclaw_net
redis:
image: redis:7-alpine
container_name: openclaw_redis
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- openclaw_net
dashboard:
build:
context: ./ui/dashboard
dockerfile: Dockerfile
container_name: openclaw_dashboard
ports:
- "3000:3000"
volumes:
- ./workspace:/app/workspace
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WORKSPACE_PATH=/app/workspace
# OpenClaw 绑定在容器内 loopback(127.0.0.1),同网络容器无法直连;
# 经宿主机端口转发才能到达。Docker Desktop(Mac/Win) 用 host.docker.internal;
# Linux 宿主请改为 host-gateway 并在 extra_hosts 中声明。
- OPENCLAW_API=http://host.docker.internal:18789
- OPENCLAW_CONTAINER=openclaw
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- openclaw
networks:
- openclaw_net
telegram-bridge:
build:
context: ./ui/telegram-bridge
dockerfile: Dockerfile
container_name: openclaw_telegram
environment:
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
- OPENCLAW_API=http://host.docker.internal:18789
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- openclaw
networks:
- openclaw_net
profiles:
- telegram
volumes:
postgres_data:
redis_data:
networks:
openclaw_net:
driver: bridge