fix(opencode): ensure proper installation and workspace setup

- Add --unsafe-perm to npm install for global package installation
- Add cd /workspace to /root/.bashrc so terminal opens in repo directory
- Start container process in /workspace directory
- Use exec for proper signal handling

Quality gates: code review
This commit is contained in:
Fusion
2026-05-21 12:34:18 +02:00
parent b61c2256a8
commit a0d4e76662
+4 -3
View File
@@ -169,10 +169,11 @@ services:
- "3000:3000"
command: >
sh -c "apt-get update && apt-get install -y git &&
npm install -g opencode-ai &&
mkdir -p /workspace &&
npm install -g opencode-ai --unsafe-perm &&
echo 'cd /workspace' >> /root/.bashrc &&
echo 'OpenCode installed. Run: opencode' &&
tail -f /dev/null"
cd /workspace &&
exec tail -f /dev/null"
stdin_open: true
tty: true
restart: unless-stopped