|
| 1 | +# ── Builder ────────────────────────────────────────── |
| 2 | +FROM node:22-slim AS builder |
| 3 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 4 | + python3 make g++ git \ |
| 5 | + && rm -rf /var/lib/apt/lists/* |
| 6 | + |
| 7 | +WORKDIR /app |
| 8 | +COPY package.json package-lock.json tsconfig.base.json ./ |
| 9 | +COPY packages/shared/package.json packages/shared/ |
| 10 | +COPY packages/web-ui/package.json packages/web-ui/ |
| 11 | +COPY apps/agent/package.json apps/agent/ |
| 12 | +COPY apps/desktop/package.json apps/desktop/ |
| 13 | +RUN npm ci --ignore-scripts && npm rebuild better-sqlite3 |
| 14 | + |
| 15 | +COPY packages/shared/ packages/shared/ |
| 16 | +COPY apps/agent/ apps/agent/ |
| 17 | +RUN npm run build:shared && npm run build -w @aurevoy/agent && npm prune --production |
| 18 | + |
| 19 | +# ── Runtime ────────────────────────────────────────── |
| 20 | +FROM node:22-slim |
| 21 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 22 | + git python3 curl ca-certificates \ |
| 23 | + && curl -LsSf https://astral.sh/uv/install.sh | sh \ |
| 24 | + && mv /root/.local/bin/uv /usr/local/bin/uv \ |
| 25 | + && apt-get purge -y curl \ |
| 26 | + && apt-get autoremove -y \ |
| 27 | + && rm -rf /var/lib/apt/lists/* /root/.local |
| 28 | + |
| 29 | +WORKDIR /app |
| 30 | +COPY --from=builder /app/node_modules ./node_modules |
| 31 | +COPY --from=builder /app/packages/shared/dist ./packages/shared/dist |
| 32 | +COPY --from=builder /app/packages/shared/package.json ./packages/shared/ |
| 33 | +COPY --from=builder /app/apps/agent/dist ./apps/agent/dist |
| 34 | +COPY --from=builder /app/apps/agent/package.json ./apps/agent/ |
| 35 | +COPY --from=builder /app/apps/agent/skills ./apps/agent/skills |
| 36 | + |
| 37 | +ENV AUREVOY_HOST=0.0.0.0 \ |
| 38 | + AUREVOY_PORT=8787 \ |
| 39 | + AUREVOY_PYTHON_AUTO_SETUP=false \ |
| 40 | + AUREVOY_PYTHON_HOME=/usr \ |
| 41 | + AUREVOY_LOG_PRETTY=false \ |
| 42 | + NODE_ENV=production |
| 43 | + |
| 44 | +VOLUME ["/root/.aurevoy"] |
| 45 | + |
| 46 | +EXPOSE 8787 |
| 47 | +HEALTHCHECK --interval=30s --timeout=3s \ |
| 48 | + CMD node -e "fetch('http://127.0.0.1:8787/api/health').then(r=>{process.exit(r.ok?0:1)})" |
| 49 | + |
| 50 | +CMD ["node", "apps/agent/dist/index.js"] |
0 commit comments