From 89188e4b4593abdaf030a4fbbb0ee08e3e0d16d6 Mon Sep 17 00:00:00 2001 From: Mariano Fuentes Date: Thu, 11 Dec 2025 16:22:46 -0800 Subject: [PATCH] chore(api): update buildspec to handle multiple output structures (#1911) --- apps/api/buildspec.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/api/buildspec.yml b/apps/api/buildspec.yml index 2abffc1d8..38198432d 100644 --- a/apps/api/buildspec.yml +++ b/apps/api/buildspec.yml @@ -50,13 +50,20 @@ phases: - echo "Checking build output..." - ls -la dist/ - - ls -la dist/src/ - - '[ -f "dist/src/main.js" ] || { echo "❌ main.js not found in dist/src"; exit 1; }' + - ls -la dist/apps/api/src/ || ls -la dist/src/ + - '[ -f "dist/apps/api/src/main.js" ] || [ -f "dist/src/main.js" ] || { echo "❌ main.js not found"; exit 1; }' - mkdir -p ../docker-build - - cp -r dist/* ../docker-build/ + # Handle both output structures (dist/apps/api/src or dist/src) + - | + if [ -d "dist/apps/api/src" ]; then + echo "Using composite output structure..." + cp -r dist/apps/api/* ../docker-build/ + else + echo "Using standard output structure..." + cp -r dist/* ../docker-build/ + fi - cp -r prisma ../docker-build/ - - echo "Verifying copied files..." - ls -la ../docker-build/ - ls -la ../docker-build/src/