fix(opencode): add debugging output for installation

- Add set -x for verbose command execution
- Add error messages if npm install fails
- Check which opencode and list global bin directory
- Add npm global bin to PATH in bashrc
- Add ca-certificates package for HTTPS

Quality gates: code review
This commit is contained in:
Fusion
2026-05-21 12:40:01 +02:00
parent a0d4e76662
commit ae377baa74
+9 -3
View File
@@ -168,10 +168,16 @@ services:
ports:
- "3000:3000"
command: >
sh -c "apt-get update && apt-get install -y git &&
npm install -g opencode-ai --unsafe-perm &&
sh -c "set -x &&
apt-get update && apt-get install -y git ca-certificates &&
echo 'Installing opencode...' &&
npm install -g opencode-ai 2>&1 || echo 'ERROR: npm install failed' &&
which opencode || echo 'ERROR: opencode not in PATH' &&
npm bin -g &&
ls -la $(npm bin -g) || echo 'ERROR: global bin dir not found' &&
echo 'export PATH=\"$(npm bin -g):\$PATH\"' >> /root/.bashrc &&
echo 'cd /workspace' >> /root/.bashrc &&
echo 'OpenCode installed. Run: opencode' &&
echo 'OpenCode installation complete' &&
cd /workspace &&
exec tail -f /dev/null"
stdin_open: true