feat: start sync-server alongside Theia

This commit is contained in:
2026-03-07 21:36:48 +00:00
parent 9b49e9d327
commit 2073f030d1

View File

@@ -24,7 +24,8 @@ if [ -n "$GITEA_REPO" ] && [ -n "$GITEA_TOKEN" ]; then
fi
git config --global credential.helper store
printf "https://vibn:%s@%s\n" "$GITEA_TOKEN" "${GITEA_BASE#https://}" \
printf "https://vibn:%s@%s
" "$GITEA_TOKEN" "${GITEA_BASE#https://}" \
> /home/theia/.git-credentials 2>/dev/null || true
git config --global user.name "Vibn IDE"
git config --global user.email "ide@vibnai.com"
@@ -68,6 +69,12 @@ SETTINGS
echo "[startup] Settings written to ${SETTINGS_DIR}/settings.json"
# ── Start sync server (agent runner calls this to trigger git pull) ───────────
if [ -f /sync-server.js ]; then
echo "[startup] Starting sync server on :3001..."
node /sync-server.js &
fi
# ── Start Theia ───────────────────────────────────────────────────────────────
echo "[startup] Starting Theia → ${OPEN_PATH}"
exec node /home/theia/applications/browser/lib/backend/main.js \