fix: Docker build uses monorepo root context for workspace links
Some checks are pending
CI / build-check-test (push) Waiting to run
Some checks are pending
CI / build-check-test (push) Waiting to run
This commit is contained in:
parent
bdd881e80c
commit
62c057e18c
3 changed files with 29 additions and 8 deletions
11
.dockerignore
Normal file
11
.dockerignore
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
node_modules
|
||||
.git
|
||||
*.log
|
||||
.env
|
||||
.env.*
|
||||
dist
|
||||
**/.turbo
|
||||
**/node_modules
|
||||
**/.next
|
||||
coverage
|
||||
.nyc_output
|
||||
|
|
@ -11,16 +11,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
libasound2 libwayland-client0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --omit=dev
|
||||
|
||||
RUN npx playwright install chromium
|
||||
WORKDIR /monorepo
|
||||
|
||||
# Copy entire monorepo so file: workspace links resolve
|
||||
COPY . .
|
||||
|
||||
RUN npm run build 2>/dev/null || true
|
||||
# Install and build workspace packages in dependency order
|
||||
RUN cd packages/ai && npm install && npm run build
|
||||
RUN cd packages/tui && npm install && npm run build
|
||||
RUN cd packages/agent && npm install && npm run build
|
||||
RUN cd packages/web-ui && npm install && npm run build
|
||||
|
||||
# Install example app dependencies (resolves file: links from monorepo)
|
||||
RUN cd packages/web-ui/example && npm install
|
||||
|
||||
# Install Playwright Chromium
|
||||
RUN cd packages/web-ui/example && npx playwright install chromium
|
||||
|
||||
WORKDIR /monorepo/packages/web-ui/example
|
||||
|
||||
EXPOSE 5173 7700
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
services:
|
||||
jae-web:
|
||||
build: .
|
||||
build:
|
||||
context: ../../..
|
||||
dockerfile: packages/web-ui/example/Dockerfile
|
||||
ports:
|
||||
- "5173:5173"
|
||||
- "7700:7700"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue