mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-07 22:24:06 -05:00
improvement(monorepo): added tsconfig package, resolved type errors in testing package (#2613)
This commit is contained in:
@@ -18,18 +18,19 @@ FROM base AS deps
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock turbo.json ./
|
||||
RUN mkdir -p apps packages/db packages/testing packages/logger
|
||||
RUN mkdir -p apps packages/db packages/testing packages/logger packages/tsconfig
|
||||
COPY apps/sim/package.json ./apps/sim/package.json
|
||||
COPY packages/db/package.json ./packages/db/package.json
|
||||
COPY packages/testing/package.json ./packages/testing/package.json
|
||||
COPY packages/logger/package.json ./packages/logger/package.json
|
||||
COPY packages/tsconfig/package.json ./packages/tsconfig/package.json
|
||||
|
||||
# Install turbo globally, then dependencies, then rebuild isolated-vm for Node.js
|
||||
RUN --mount=type=cache,id=bun-cache,target=/root/.bun/install/cache \
|
||||
--mount=type=cache,id=npm-cache,target=/root/.npm \
|
||||
bun install -g turbo && \
|
||||
HUSKY=0 bun install --omit=dev --ignore-scripts && \
|
||||
cd $(readlink -f node_modules/isolated-vm) && npx node-gyp rebuild --release && cd /app
|
||||
cd node_modules/.bun/isolated-vm@*/node_modules/isolated-vm && npx node-gyp rebuild --release && cd /app
|
||||
|
||||
# ========================================
|
||||
# Builder Stage: Build the Application
|
||||
@@ -104,7 +105,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/apps/sim/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/sim/.next/static ./apps/sim/.next/static
|
||||
|
||||
# Copy isolated-vm native module (compiled for Node.js in deps stage)
|
||||
COPY --from=deps --chown=nextjs:nodejs /app/node_modules/isolated-vm ./node_modules/isolated-vm
|
||||
COPY --from=deps --chown=nextjs:nodejs /app/node_modules/.bun/isolated-vm@6.0.2/node_modules/isolated-vm ./node_modules/isolated-vm
|
||||
|
||||
# Copy the isolated-vm worker script
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/sim/lib/execution/isolated-vm-worker.cjs ./apps/sim/lib/execution/isolated-vm-worker.cjs
|
||||
|
||||
@@ -11,11 +11,12 @@ RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock turbo.json ./
|
||||
RUN mkdir -p apps packages/db packages/testing packages/logger
|
||||
RUN mkdir -p apps packages/db packages/testing packages/logger packages/tsconfig
|
||||
COPY apps/sim/package.json ./apps/sim/package.json
|
||||
COPY packages/db/package.json ./packages/db/package.json
|
||||
COPY packages/testing/package.json ./packages/testing/package.json
|
||||
COPY packages/logger/package.json ./packages/logger/package.json
|
||||
COPY packages/tsconfig/package.json ./packages/tsconfig/package.json
|
||||
|
||||
# Install dependencies with cache mount for faster builds
|
||||
RUN --mount=type=cache,id=bun-cache,target=/root/.bun/install/cache \
|
||||
|
||||
Reference in New Issue
Block a user