File tree Expand file tree Collapse file tree 2 files changed +8
-22
lines changed
Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,11 @@ RUN apk add --no-cache wget curl bash libc6-compat openssl
66
77WORKDIR /app
88
9- # Copy manifests first and install production deps inside the image (avoid broken bun symlinks)
9+ # Copy package.json and pre-installed node_modules from buildspec
1010COPY package.json ./
11+ COPY node_modules ./node_modules
1112
12- # Install bun and deps
13- # Note: workspace:* dependencies will be skipped and copied manually below
14- RUN curl -fsSL https://bun.sh/install | bash \
15- && export PATH="/root/.bun/bin:$PATH" \
16- && bun install --production --ignore-scripts
17-
18- COPY node_modules/@trycompai ./node_modules/@trycompai
19- COPY node_modules/@comp ./node_modules/@comp
20- COPY node_modules/@prisma ./node_modules/@prisma
21- COPY node_modules/.prisma ./node_modules/.prisma
22-
13+ # Copy built application and prisma files
2314COPY . .
2415
2516# Set environment variables
Original file line number Diff line number Diff line change @@ -61,20 +61,15 @@ phases:
6161 - ls -la ../docker-build/src/
6262 - ' [ -f "../docker-build/src/main.js" ] || { echo "❌ main.js not found in docker-build/src"; exit 1; }'
6363
64- - mkdir -p ../docker-build/node_modules/@trycompai
65- - mkdir -p ../docker-build/node_modules/@trycompai/utils
66- - mkdir -p ../docker-build/node_modules/@trycompai/db
64+ # Copy ALL node_modules from root (already installed with production deps)
65+ - echo "Copying node_modules from root..."
66+ - cp -r ../../node_modules ../docker-build/
67+
68+ # Override workspace packages with built versions
6769 - cp -r ../../packages/utils/src ../docker-build/node_modules/@trycompai/utils/
6870 - cp ../../packages/utils/package.json ../docker-build/node_modules/@trycompai/utils/
69-
7071 - cp -r ../../packages/db/dist ../docker-build/node_modules/@trycompai/db/
7172 - cp ../../packages/db/package.json ../docker-build/node_modules/@trycompai/db/
72-
73- - cp -r ../../node_modules/@prisma ../docker-build/node_modules/@prisma
74- - cp -r ../../node_modules/.prisma ../docker-build/node_modules/.prisma
75-
76- # Integration platform (workspace package)
77- - mkdir -p ../docker-build/node_modules/@comp/integration-platform
7873 - cp -r ../../packages/integration-platform/dist ../docker-build/node_modules/@comp/integration-platform/
7974 - cp ../../packages/integration-platform/package.json ../docker-build/node_modules/@comp/integration-platform/
8075
You can’t perform that action at this time.
0 commit comments