added opencode

This commit is contained in:
2026-06-10 07:19:56 +00:00
parent 112eb30244
commit 20b5417e30
4 changed files with 64 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# OpenCode
## Overview
I have added a config file that uses local ollama (see ollama directory of cookbooks)
## Project Details
- **Project Repository:** [Link](https://example.com)
- **Container Image:** [Docker Hub](https://dockerhub.com)
- **Compose Example:** [Compose](https://dockerhub.com)
- **Documentation:** [Docs](https://dockerhub.com)
- **Reverse Proxy Port:** `80`
## Config file
You can copy the config.json file to your volume. Change the model and host data to your settings.
## Gotcha
Config ollama: https://github.com/p-lemonish/ollama-x-opencode
+21
View File
@@ -0,0 +1,21 @@
# OpenCode Docker Compose
services:
opencode:
image: ${OPENCODE_IMAGE_NAME:-ghcr.io/anomalyco/opencode:latest}
restart: ${OPENCODE_RESTART:-unless-stopped}
volumes:
- ${VOL_PATH:-/data}/opencode/config:/config
- ${VOL_PATH:-/data}/opencode/data:/data
- ${VOL_PATH:-/data}/opencode/projects:/projects
environment:
- OPENCODE_PORT=${OPENCODE_PORT:-4096}
- OPENCODE_HOSTNAME=${OPENCODE_HOSTNAME:-localhost}
- OPENCODE_CONFIG=/config/config.json
- OPENCODE_MODEL=ollama/qwen3:8b-16k
- OLLAMA_HOST=http://10.1.1.16:11434
ports:
- "${OPENCODE_PORT:-4096}:4096"
+17
View File
@@ -0,0 +1,17 @@
{
"$schema": "https://opencode.ai/config.json",
"model": "ollama/qwen3:8b-16k",
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "http://10.1.1.16:11434/v1"
},
"models": {
"qwen3:8b-16k": {
"tools": true
}
}
}
}
}
+5
View File
@@ -0,0 +1,5 @@
OPENCODE_IMAGE_NAME=ghcr.io/anomalyco/opencode:latest
OPENCODE_RESTART=unless-stopped
VOL_PATH=/home/youruser/.local/share
OPENCODE_PORT=4096
OPENCODE_HOSTNAME=localhost