41 lines
1.5 KiB
Docker
41 lines
1.5 KiB
Docker
FROM node:20-slim
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
|
ENV HUSKY=0
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
git curl ca-certificates \
|
|
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
|
|
libdrm2 libdbus-1-3 libxkbcommon0 libatspi2.0-0 \
|
|
libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
|
|
libasound2 libwayland-client0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /monorepo
|
|
|
|
# Copy entire monorepo so file: workspace links resolve
|
|
COPY . .
|
|
|
|
# Kill the husky prepare script - binary doesn't exist in container
|
|
RUN node -e "const p=require('./package.json'); delete p.scripts.prepare; require('fs').writeFileSync('./package.json', JSON.stringify(p,null,2))"
|
|
|
|
# Install and build workspace packages in dependency order
|
|
RUN cd packages/ai && npm install --ignore-scripts && npm run build
|
|
RUN cd packages/tui && npm install --ignore-scripts && npm run build
|
|
RUN cd packages/agent && npm install --ignore-scripts && npm run build
|
|
RUN cd packages/web-ui && npm install --ignore-scripts && npm run build
|
|
|
|
# Install example app dependencies
|
|
RUN cd packages/web-ui/example && npm install --ignore-scripts
|
|
|
|
# Install Playwright Chromium
|
|
RUN cd packages/web-ui/example && npx playwright install chromium
|
|
|
|
WORKDIR /monorepo/packages/web-ui/example
|
|
|
|
EXPOSE 5173 7700
|
|
|
|
ENV TOOL_SERVER_PORT=7700
|
|
|
|
CMD ["sh", "-c", "node server/tool-server.mjs & npx vite --host 0.0.0.0 --port 5173"]
|