-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (98 loc) · 3.23 KB
/
docker-compose.yml
File metadata and controls
103 lines (98 loc) · 3.23 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
# OCC Editor & Web Development Services
#
# PURPOSE:
# Development environment for OCC editor (VSCode fork) and Next.js web app.
# Separate concern from OpenClaw services (see docker/docker-compose.openclaw.yml).
#
# USAGE:
# docker-compose up -d # Start both services
# docker-compose logs -f editor # View editor logs
# docker-compose exec editor bash # Access container shell
# docker-compose down # Stop
#
# SERVICES:
# - editor : VSCode fork on port 9888 (healthcheck ~9 min cold start)
# - web : Next.js web app on port 3002
#
# NOTES:
# - Root-level location (legacy convention)
# - Never used in production builds or CI/CD
# - Separate network from OpenClaw services
#
# See DOCKER.md for detailed configuration and usage.
version: "3.9"
services:
editor:
build:
context: .
dockerfile: Dockerfile.build-linux
image: occ-build-linux:latest
container_name: occ-editor-dev
working_dir: /workspace
# ports:
# - "9888:9888"
environment:
NODE_ENV: development
NODE_OPTIONS: --max-old-space-size=2048
GITHUB_TOKEN: ${GITHUB_TOKEN:-OCC_GITHUB_TOKEN_NOT_SET}
TSC_TRANSPILE_CPU_RATIO: ${TSC_TRANSPILE_CPU_RATIO:-0.75}
# HOST_WORKSPACE lets extensions resolve host-side paths when invoking
# docker-in-docker (via the mounted socket). Without it, volume paths
# resolve to container-internal paths (e.g. /workspace/...) which the
# host Docker daemon creates as root, causing EACCES in child containers.
HOST_WORKSPACE: ${PWD}
command: ['bash','-lc','/workspace/scripts/docker-dev.sh']
volumes:
- .:/workspace
- /var/run/docker.sock:/var/run/docker.sock
#- vscode-linux-x64:/workspace/apps/VSCode-linux-x64
#- vscode-darwin-x64:/workspace/apps/VSCode-darwin-x64
#- vscode-darwin-arm64:/workspace/apps/VSCode-darwin-arm64
#- vscode-win32-x64:/workspace/apps/VSCode-win32-x64
#- vscode-win32-arm64:/workspace/apps/VSCode-win32-arm64
#- vscode-win32-ia32:/workspace/apps/VSCode-win32-ia32
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:9888/"]
interval: 15s
timeout: 5s
retries: 5
start_period: 600s # cold start: ~9 min for full client compilation
network_mode: host
mem_limit: ${MEM_LIMIT:-0.0}
cpus: ${CPUS:-0.0}
restart: unless-stopped
privileged: true
web:
build:
context: .
dockerfile: Dockerfile.build-linux
image: occ-build-linux:latest
container_name: occ-web-dev
working_dir: /workspace
volumes:
- .:/workspace
ports:
- "3002:3000"
environment:
NODE_ENV: development
NEXT_PUBLIC_API_URL: http://localhost:3001
entrypoint: sh
command:
- -c
- "[ -s /root/.nvm/nvm.sh ] && . /root/.nvm/nvm.sh; cd apps/web && npm ci --ignore-scripts && npm run dev"
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3000/"]
interval: 15s
timeout: 5s
retries: 5
start_period: 120s
depends_on:
editor:
condition: service_healthy
volumes:
vscode-linux-x64:
vscode-darwin-x64:
vscode-darwin-arm64:
vscode-win32-x64:
vscode-win32-arm64:
vscode-win32-ia32: