Skip to content

Commit 329ffa5

Browse files
authored
Mariano/fix api build 4 (#1773)
* chore(api): update buildspec and Dockerfile to copy pre-built workspace packages * chore(bun.lock): update package versions and add new dependencies * chore(api): update buildspec to remove UI and Utils package copying
1 parent 3865af7 commit 329ffa5

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

apps/api/buildspec.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ phases:
3232
- echo "Installing API dependencies only..."
3333
- bun install --filter=@comp/api --frozen-lockfile || bun install --filter=@comp/api --ignore-scripts || bun install --ignore-scripts
3434

35-
# Build workspace dependencies (ui -> email)
36-
- echo "Building @trycompai/ui package..."
37-
- cd packages/ui
38-
- bun run build
39-
- cd ../..
35+
# Build email package (required dependency for API)
4036
- echo "Building @trycompai/email package..."
4137
- cd packages/email
4238
- bun run build
@@ -80,21 +76,14 @@ phases:
8076
- echo "Skipping host node_modules copy; Dockerfile installs prod deps inside image"
8177

8278
# Copy built workspace packages (needed for runtime)
83-
# These packages are built above and need to be available in Docker
79+
# Only copy packages that are actually imported at runtime
80+
# Email package is already bundled, so only need its dist
8481
- echo "Copying built workspace packages..."
8582
- mkdir -p ../docker-build/node_modules/@trycompai
86-
# Email package - copy dist and package.json
83+
# Email package - copy dist and package.json (needed at runtime)
8784
- mkdir -p ../docker-build/node_modules/@trycompai/email
8885
- cp -r ../../packages/email/dist ../docker-build/node_modules/@trycompai/email/
8986
- cp ../../packages/email/package.json ../docker-build/node_modules/@trycompai/email/
90-
# UI package - copy dist and package.json
91-
- mkdir -p ../docker-build/node_modules/@trycompai/ui
92-
- cp -r ../../packages/ui/dist ../docker-build/node_modules/@trycompai/ui/
93-
- cp ../../packages/ui/package.json ../docker-build/node_modules/@trycompai/ui/
94-
# Utils package - copy src (no build step) and package.json
95-
- mkdir -p ../docker-build/node_modules/@trycompai/utils
96-
- cp -r ../../packages/utils/src ../docker-build/node_modules/@trycompai/utils/
97-
- cp ../../packages/utils/package.json ../docker-build/node_modules/@trycompai/utils/
9887

9988
# Copy Dockerfile
10089
- echo "Copying Dockerfile..."

0 commit comments

Comments
 (0)