chore: move /agent to /apps/agent

This commit is contained in:
Acbox
2026-03-06 17:32:12 +08:00
parent 4109a141f9
commit 47a425baf5
23 changed files with 59 additions and 72 deletions
+8 -8
View File
@@ -4,21 +4,21 @@ FROM --platform=$BUILDPLATFORM oven/bun:1 AS builder
WORKDIR /build
# Set up workspace structure so bun can resolve workspace deps (@memoh/config, @memoh/agent)
COPY agent/package.json agent/bun.lock* ./agent/
COPY apps/agent/package.json apps/agent/bun.lock* ./apps/agent/
COPY packages/config/package.json ./packages/config/package.json
COPY packages/agent/package.json ./packages/agent/package.json
# Create root package.json with workspace config
RUN echo '{"name":"@memoh/monorepo","private":true,"workspaces":["agent","packages/*"]}' > package.json
RUN echo '{"name":"@memoh/monorepo","private":true,"workspaces":["apps/*","packages/*"]}' > package.json
RUN cd agent && bun install
RUN cd apps/agent && bun install
# Copy source files
COPY packages/config/ ./packages/config/
COPY packages/agent/ ./packages/agent/
COPY agent/ ./agent/
COPY apps/agent/ ./apps/agent/
RUN cd agent && bun run build
RUN cd apps/agent && bun run build
FROM oven/bun:1-alpine
@@ -26,9 +26,9 @@ WORKDIR /app
RUN apk add --no-cache ca-certificates wget
COPY --from=builder /build/agent/dist /app/dist
COPY --from=builder /build/agent/node_modules /app/node_modules
COPY --from=builder /build/agent/package.json /app/package.json
COPY --from=builder /build/apps/agent/dist /app/dist
COPY --from=builder /build/apps/agent/node_modules /app/node_modules
COPY --from=builder /build/apps/agent/package.json /app/package.json
COPY --from=builder /build/node_modules /node_modules
EXPOSE 8081