mount the config folder
This commit is contained in:
16
README.md
16
README.md
@@ -28,10 +28,24 @@ In the TUI, type `/models` to select a model from the registered weave models.
|
|||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
- `config/opencode/` - image: Dockerfile + baked `opencode.json`
|
- `config/opencode/` - image: Dockerfile + `opencode.json` (mounted live, see below)
|
||||||
- `data/` - persisted opencode state (gitignored)
|
- `data/` - persisted opencode state (gitignored)
|
||||||
- `docker-compose.yml` - opencode service
|
- `docker-compose.yml` - opencode service
|
||||||
|
|
||||||
|
## Updating the config
|
||||||
|
|
||||||
|
`opencode.json` is mounted into the container, so edits take effect with a restart — no rebuild needed:
|
||||||
|
|
||||||
|
```
|
||||||
|
drc restart opencode
|
||||||
|
```
|
||||||
|
|
||||||
|
Rebuild only when changing the `Dockerfile` or installed packages:
|
||||||
|
|
||||||
|
```
|
||||||
|
drc build opencode
|
||||||
|
```
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
- Copy from the TUI is weird over Docker: To copy text out of the opencode TUI running in a container, I have to do `Shift`+click to select the text, then `Ctrl`+`Shift`+`C` to copy. Plain `COPY` doesn't work.
|
- Copy from the TUI is weird over Docker: To copy text out of the opencode TUI running in a container, I have to do `Shift`+click to select the text, then `Ctrl`+`Shift`+`C` to copy. Plain `COPY` doesn't work.
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ services:
|
|||||||
build: ./config/opencode/
|
build: ./config/opencode/
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/opencode/share:/root/.local/share/opencode
|
- ./data/opencode/share:/root/.local/share/opencode
|
||||||
|
- ./config/opencode/opencode.json:/root/.config/opencode/opencode.json
|
||||||
|
|||||||
Reference in New Issue
Block a user