fix(opencode): use official install script from opencode.ai
This commit is contained in:
@@ -162,9 +162,9 @@ networks:
|
||||
{
|
||||
"name": "opencode",
|
||||
"display_name": "OpenCode",
|
||||
"description": "AI coding assistant with web terminal",
|
||||
"description": "AI coding assistant - run opencode in terminal",
|
||||
"category": "ai-assistant",
|
||||
"interfaces": ["terminal", "web"],
|
||||
"interfaces": ["terminal"],
|
||||
"default_port": 3000,
|
||||
"compose_template": """version: "3.8"
|
||||
services:
|
||||
@@ -180,10 +180,11 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
command: >
|
||||
sh -c "npm install -g opencode@latest &&
|
||||
sh -c "apt-get update && apt-get install -y curl git &&
|
||||
curl -fsSL https://opencode.ai/install | bash &&
|
||||
export PATH=\"$HOME/.local/bin:$PATH\" &&
|
||||
mkdir -p /workspace &&
|
||||
echo 'Starting OpenCode web server on port 3000...' &&
|
||||
node -e 'const http = require(\\"http\\"); const fs = require(\\"fs\\"); const server = http.createServer((req, res) => { res.writeHead(200, {\\"Content-Type\\": \\"text/html\\"}); res.end(\\`<!DOCTYPE html><html><head><title>OpenCode</title><style>body{font-family:monospace;background:#1e1e1e;color:#d4d4d4;margin:0;padding:20px;}h1{color:#4ec9b0;}.container{max-width:800px;margin:0 auto;}.status{padding:10px;background:#2d2d2d;border-radius:4px;margin:20px 0;}</style></head><body><div class=\\"container\\"><h1>OpenCode Agent</h1><div class=\\"status\\"><p>Status: Running</p><p>Use the Terminal button to access the interactive shell.</p></div><p>OpenCode is ready to assist with your coding tasks.</p></div></body></html>\\`); }); server.listen(3000, () => console.log(\\"OpenCode web server running on port 3000\\"));' &&
|
||||
echo 'OpenCode installed. Use the Terminal button to start opencode.' &&
|
||||
tail -f /dev/null"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
Reference in New Issue
Block a user