Backend that provisions per-user OpenCode + Gitea Docker pair via
dockerode and exposes the Grow Agent / sub-agent Rivet Kit actors
described in the PRD. Sub-agent workflows route through the parent
Grow Agent's OpenCode Docker.
- src/docker/manager.ts spawns growqr-gitea-<userId> and growqr-opencode-<userId>
- src/actors/{grow-agent,sub-agent,registry}.ts: Rivet Kit actors
- src/routes/{actors,opencode,git}.ts: PRD section 5.2-5.4 HTTP API
- docker-compose.yml runs rivet-engine + backend (mounts host Docker socket)
- PRD updated to lock in per-user OpenCode/Gitea Docker topology
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21 lines
446 B
Docker
21 lines
446 B
Docker
FROM node:22-alpine AS base
|
|
WORKDIR /app
|
|
|
|
FROM base AS deps
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install
|
|
|
|
FROM base AS build
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY tsconfig.json ./
|
|
COPY src ./src
|
|
RUN npx tsc -p tsconfig.json
|
|
|
|
FROM base AS runtime
|
|
ENV NODE_ENV=production
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY --from=build /app/dist ./dist
|
|
COPY package.json ./
|
|
EXPOSE 4000
|
|
CMD ["node", "dist/index.js"]
|