-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
156 lines (149 loc) · 4.75 KB
/
docker-compose.yml
File metadata and controls
156 lines (149 loc) · 4.75 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
services:
worldweave:
image: topiclab-worldweave:local
build:
context: ./worldweave
dockerfile: ../docker/worldweave.Dockerfile
args:
NODE_BASE_IMAGE: ${NODE_BASE_IMAGE:-docker.m.daocloud.io/library/node:20-slim}
env_file:
- ${ENV_FILE:-.env}
environment:
- PORT=3020
- HOST=0.0.0.0
- WORLD_HOST=0.0.0.0
ports:
- "${WORLDWEAVE_HOST_PORT:-3020}:3020"
volumes:
- worldweave-cache:/app/.cache
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3020/api/v1/openclaw/skill.md').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
interval: 10s
timeout: 20s
retries: 15
start_period: 60s
worldweave-refresh:
image: topiclab-worldweave:local
env_file:
- ${ENV_FILE:-.env}
environment:
- WORLD_BATCH_REFRESH_BASE_URL=http://worldweave:3020
- WORLD_SOURCE_REFRESH_INTERVAL_MINUTES=${WORLD_SOURCE_REFRESH_INTERVAL_MINUTES:-30}
- WORLD_SOURCE_REFRESH_TIMEOUT_MINUTES=${WORLD_SOURCE_REFRESH_TIMEOUT_MINUTES:-20}
command:
- sh
- -lc
- >
node scripts/world-source-refresh.mjs
--loop
--include-heavy-world-sync
--world-base-url http://worldweave:3020
--interval-minutes "$${WORLD_SOURCE_REFRESH_INTERVAL_MINUTES}"
--timeout-minutes "$${WORLD_SOURCE_REFRESH_TIMEOUT_MINUTES}"
depends_on:
worldweave:
condition: service_healthy
volumes:
- worldweave-cache:/app/.cache
networks:
- app-network
topiclab-backend:
build:
context: ./topiclab-backend
args:
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-docker.m.daocloud.io/library/python:3.11-slim}
# 阿里云超时时可设 PIP_INDEX_URL=https://pypi.org/simple/ PIP_TRUSTED_HOST=pypi.org
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple/}
PIP_TRUSTED_HOST: ${PIP_TRUSTED_HOST:-mirrors.aliyun.com}
env_file:
- ${ENV_FILE:-.env}
environment:
- WORKSPACE_BASE=/app/workspace
- TOPICLAB_SYNC_URL=${TOPICLAB_SYNC_URL:-http://topiclab-backend:8000}
- WORLDWEAVE_BASE_URL=http://worldweave:3020
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${TOPICLAB_BACKEND_PORT:-8001}:8000"
volumes:
- ${WORKSPACE_PATH:-./workspace}:/app/workspace
- ${LIBS_PATH:-./backend/libs}:/app/libs:ro
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=15)\""]
interval: 10s
timeout: 20s
retries: 15
start_period: 45s
backend:
build:
context: ./backend
args:
PYTHON_BASE_IMAGE: ${PYTHON_BASE_IMAGE:-docker.m.daocloud.io/library/python:3.11-slim}
env_file:
- ${ENV_FILE:-.env}
ports:
- "${BACKEND_PORT:-8000}:8000"
environment:
- WORKSPACE_BASE=/app/workspace
volumes:
- ${WORKSPACE_PATH:-./workspace}:/app/workspace
- ${LIBS_PATH:-./backend/libs}:/app/libs
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=10)\""]
interval: 5s
timeout: 15s
retries: 12
start_period: 30s
frontend:
build:
context: ./frontend
args:
NODE_BASE_IMAGE: ${NODE_BASE_IMAGE:-docker.m.daocloud.io/library/node:20-slim}
NGINX_BASE_IMAGE: ${NGINX_BASE_IMAGE:-docker.m.daocloud.io/library/nginx:alpine}
VITE_BASE_PATH: ${VITE_BASE_PATH:-/topic-lab/}
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${FRONTEND_PORT:-3000}:80"
depends_on:
worldweave:
condition: service_healthy
backend:
condition: service_healthy
topiclab-backend:
condition: service_healthy
networks:
- app-network
topiclab-cli-runner:
profiles:
- cli
build:
context: ./topiclab-cli
args:
NODE_BASE_IMAGE: ${NODE_BASE_IMAGE:-docker.m.daocloud.io/library/node:20-slim}
environment:
- TOPICLAB_BASE_URL=http://topiclab-backend:8000
- TOPICLAB_CLI_HOME=/tmp/topiclab-cli
- TOPICLAB_SMOKE_MEDIA_FILE=/fixtures/logo_complete.webp
- TOPICLAB_SMOKE_SKIP_MEDIA_UPLOAD=${TOPICLAB_SMOKE_SKIP_MEDIA_UPLOAD:-0}
depends_on:
backend:
condition: service_healthy
topiclab-backend:
condition: service_healthy
command: ["node", "dist/cli.js", "--help"]
volumes:
- ./frontend/public/media/logo_complete.webp:/fixtures/logo_complete.webp:ro
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
worldweave-cache: