Add opencode_service to unified repo

This commit is contained in:
2026-02-28 15:09:40 +11:00
parent 76f7367e2f
commit 03758a7c4e
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
FROM node:20-slim
# Install the opencode-ai CLI globally
RUN npm install -g opencode-ai@1.1.47
WORKDIR /app
# Expose the headless server port
EXPOSE 5000
# Start in headless mode, listening on all interfaces
CMD ["opencode", "serve", "--port", "5000", "--hostname", "0.0.0.0"]

View File

@@ -0,0 +1,21 @@
services:
opencode-brain:
build: .
container_name: opencode-brain
environment:
- OPENROUTER_API_KEY=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
- OPENROUTER_MODEL_NAME=google/gemini-3-flash-preview
- OPENCODE_SERVER_PASSWORD=sam4jo
volumes:
- .:/app
- /home/sam/.config/opencode:/root/.config/opencode
- /home/sam/.local/share/opencode:/root/.local/share/opencode
ports:
- "5000:5000"
networks:
- ai-mesh
restart: unless-stopped
networks:
ai-mesh:
external: true