-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.opencode.yaml
More file actions
96 lines (86 loc) · 2.88 KB
/
docker-compose.opencode.yaml
File metadata and controls
96 lines (86 loc) · 2.88 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
#ddev-generated
# OpenCode AI container for DDEV
# Provides an AI-powered development environment with access to web container
# Install: ddev add-on get trebormc/ddev-opencode
services:
opencode:
container_name: ddev-${DDEV_SITENAME}-opencode
hostname: opencode
build:
context: .
dockerfile: opencode-build/Dockerfile.opencode
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}
restart: "no"
user: "${DDEV_UID:-1000}:${DDEV_GID:-1000}"
working_dir: /var/www/html
depends_on:
web:
condition: service_started
playwright-mcp:
condition: service_started
beads:
condition: service_started
agents-sync:
condition: service_healthy
volumes:
- ../:/var/www/html
# Agents, skills, rules from agents-sync volume (directory subpath mounts)
- type: volume
source: agents-opencode-data
target: /home/opencode/.config/opencode/agent
volume:
subpath: agents
read_only: true
- type: volume
source: agents-opencode-data
target: /home/opencode/.config/opencode/skills
volume:
subpath: skills
read_only: true
- type: volume
source: agents-opencode-data
target: /home/opencode/.config/opencode/rules
volume:
subpath: rules
read_only: true
# Full agents volume (for CLAUDE.md and config copy in entrypoint)
- agents-opencode-data:/agents-data:ro
# Shared credentials — only auth.json, not the full directory
- ${HOST_OPENCODE_DIR}/auth.json:/home/opencode/.local/share/opencode/auth.json
- ${HOST_OPENCODE_DIR}/config/opencode.json:/home/opencode/.config/opencode/opencode.json
- ${HOST_OPENCODE_DIR}/config/opencode-notifier.json:/home/opencode/.config/opencode/opencode-notifier.json
# Plugin node_modules (persistent across restarts)
- ${HOST_OPENCODE_DIR}/config/node_modules:/home/opencode/.config/opencode/node_modules
- ddev-global-cache:/mnt/ddev-global-cache
environment:
- HOME=/home/opencode
- DDEV_SITENAME
- DDEV_PRIMARY_URL
- DDEV_HTTP_URL=http://${DDEV_SITENAME}.ddev.site
- DDEV_DOCROOT
- IS_DDEV_PROJECT=true
- WEB_CONTAINER=ddev-${DDEV_SITENAME}-web
- DB_CONTAINER=ddev-${DDEV_SITENAME}-db
- PLAYWRIGHT_MCP_URL=http://playwright-mcp:8931/mcp
- BEADS_CONTAINER=ddev-${DDEV_SITENAME}-beads
- OPENCODE_DISABLE_TERMINAL_TITLE=1
- TZ=${TZ:-UTC}
stdin_open: true
tty: true
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- default
- ddev_default
command: ["sleep", "infinity"]
networks:
ddev_default:
name: ddev_default
external: true
volumes:
agents-opencode-data:
name: ddev-${DDEV_SITENAME}-agents-opencode
ddev-global-cache:
external: true