From a0d4e766628b0d438facb25362a1f87c049284ac Mon Sep 17 00:00:00 2001 From: Fusion Date: Thu, 21 May 2026 12:34:18 +0200 Subject: [PATCH] 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 --- apps/api/src/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/api/src/main.py b/apps/api/src/main.py index 1728a61..a56687b 100644 --- a/apps/api/src/main.py +++ b/apps/api/src/main.py @@ -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