mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added opencode
This commit is contained in:
@@ -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
|
||||||
@@ -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"
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user