mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
2.1 KiB
2.1 KiB
OpenCode
Overview
OpenCode is an open source AI coding agent.
Project Details
Config file
The config.json at opencode/config/config.json is pre-configured for
Ollama. Available models include:
| Model | Default | Purpose |
|---|---|---|
qwen2.5-coder:14b |
default | Coding & agent tasks (recommended for this repo) |
qwen3:8b / qwen3:8b-16k |
General purpose, tool support | |
qwen2.5:7b |
Lightweight general purpose | |
mistral:latest / mistral-small3.2:latest |
Chat & multilingual | |
llama3.1:8b |
General purpose |
Tested on an NVIDIA GeForce RTX 5060 Ti (16 GB VRAM).
To use a custom config with VOL_PATH=/data, copy it to:
/data/opencode/config/config.json
Ollama
This stack requires the ollama stack to be running. The config
connects to http://localhost:11434/v1 inside the container.
To use a host-side ollama instead, set OLLAMA_HOST=http://host.docker.internal:11434.
Environment Variables
OPENCODE_SERVER_PASSWORD— required. Set a strong password for the web UI.OLLAMA_HOST— Ollama API endpoint (defaulthttp://localhost:11434)OPENCODE_PORT— Web UI port (default4096)VOL_PATH— Base path for persistent data (default/data)
Volume Notes
With VOL_PATH=/data:
| Container path | Host path | Purpose |
|---|---|---|
/config |
/data/opencode/config |
Config files (config.json) |
/data |
/data/opencode/data |
OpenCode state |
/projects |
/data/opencode/projects |
Workspace/project files |
Network Notes
Requires proxy network
dockhand Stack, Deploy from Git
Cookbooks Repository stackname: opencode Compose file path: opencode/compose.yaml Additional env file (optional): opencode/sample.env
Then "Load" opencode/sample.env into the Environmental variables in dockhand.
Create the Stack