-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.opencode.yml
More file actions
29 lines (27 loc) · 1.38 KB
/
Copy pathdocker-compose.opencode.yml
File metadata and controls
29 lines (27 loc) · 1.38 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
# Optional development override for OpenCode credentials.
#
# Usage:
# mkdir -p ~/.config/opencode ~/.local/share/opencode
# docker compose -f docker-compose.yml -f docker-compose.opencode.yml up
#
# The paths are mounted at identical host/container locations so worker and API
# containers can pass host-valid bind paths to spawned OpenCode agent containers.
services:
worker:
volumes:
- ${HOME:?HOME must be set}/.config/opencode:${HOME:?HOME must be set}/.config/opencode
- ${HOME:?HOME must be set}/.local/share/opencode:${HOME:?HOME must be set}/.local/share/opencode
indexing-worker:
volumes:
- ${HOME:?HOME must be set}/.config/opencode:${HOME:?HOME must be set}/.config/opencode:ro
- ${HOME:?HOME must be set}/.local/share/opencode:${HOME:?HOME must be set}/.local/share/opencode:ro
api:
environment:
# Identity must use the persistent mount, not packages/api/data.
- DATA_DIR=/usr/src/app/data
# API-side mounts are read-only: the API reads saved config/auth metadata for
# validation and image/version operations. Auth refresh happens in spawned
# worker OpenCode agent containers, which mount the data dir read-write.
volumes:
- ${HOME:?HOME must be set}/.config/opencode:${HOME:?HOME must be set}/.config/opencode:ro
- ${HOME:?HOME must be set}/.local/share/opencode:${HOME:?HOME must be set}/.local/share/opencode:ro