Compare commits
3 Commits
scaleway-g
...
1d45a7caea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d45a7caea | ||
|
|
8a4e21fc2e | ||
|
|
113db0b0dd |
14
README.md
14
README.md
@@ -26,26 +26,14 @@ drc exec opencode opencode
|
|||||||
|
|
||||||
In the TUI, type `/models` to select a model from the registered weave models.
|
In the TUI, type `/models` to select a model from the registered weave models.
|
||||||
|
|
||||||
## Layout
|
|
||||||
|
|
||||||
- `config/opencode/` - image: Dockerfile + `opencode.json` (mounted live, see below)
|
|
||||||
- `data/` - persisted opencode state (gitignored)
|
|
||||||
- `docker-compose.yml` - opencode service
|
|
||||||
|
|
||||||
## Updating the config
|
## Updating the config
|
||||||
|
|
||||||
`opencode.json` is mounted into the container, so edits take effect with a restart — no rebuild needed:
|
`opencode.json` is mounted into the container. After editing:
|
||||||
|
|
||||||
```
|
```
|
||||||
drc restart opencode
|
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.
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
FROM node:22-slim
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
git curl ca-certificates python3 \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN npm install -g \
|
|
||||||
opencode-ai@1.17.9 \
|
|
||||||
typescript \
|
|
||||||
typescript-language-server \
|
|
||||||
pyright
|
|
||||||
|
|
||||||
ENV NODE_PATH=/usr/local/lib/node_modules
|
|
||||||
|
|
||||||
COPY opencode.json /root/.config/opencode/opencode.json
|
|
||||||
|
|
||||||
WORKDIR /workspace
|
|
||||||
|
|
||||||
CMD ["sleep", "infinity"]
|
|
||||||
@@ -2,7 +2,7 @@ version: '3.7'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
opencode:
|
opencode:
|
||||||
build: ./config/opencode/
|
image: redpencil/opencode:0.0.1
|
||||||
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
|
- ./config/opencode/opencode.json:/root/.config/opencode/opencode.json
|
||||||
|
|||||||
Reference in New Issue
Block a user