feat: Add debug output to Dockerfiles and .dockerignore
- Add .dockerignore to exclude node_modules, dist, and build artifacts - Add pre/post build directory listings to diagnose dist not found issue - Disable turbo cache temporarily with --force flag - Add --verbosity=2 for more detailed turbo output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,11 +51,23 @@ COPY --from=deps /app/apps/web/node_modules ./apps/web/node_modules
|
||||
ARG NEXT_PUBLIC_API_URL
|
||||
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||||
|
||||
# Debug: Show what we have before building
|
||||
RUN echo "=== Pre-build directory structure ===" && \
|
||||
echo "--- packages/config/typescript ---" && ls -la packages/config/typescript/ && \
|
||||
echo "--- packages/shared (top level) ---" && ls -la packages/shared/ && \
|
||||
echo "--- packages/ui (top level) ---" && ls -la packages/ui/ && \
|
||||
echo "--- apps/web (top level) ---" && ls -la apps/web/
|
||||
|
||||
# Build the web app and its dependencies using TurboRepo
|
||||
# This ensures @mosaic/shared and @mosaic/ui are built first
|
||||
# Cache TurboRepo build outputs for faster subsequent builds
|
||||
RUN --mount=type=cache,id=turbo-cache,target=/app/.turbo \
|
||||
pnpm turbo build --filter=@mosaic/web
|
||||
# Disable turbo cache temporarily to ensure fresh build
|
||||
RUN pnpm turbo build --filter=@mosaic/web --force
|
||||
|
||||
# Debug: Show what was built
|
||||
RUN echo "=== Post-build directory structure ===" && \
|
||||
echo "--- packages/shared/dist ---" && ls -la packages/shared/dist/ 2>/dev/null || echo "NO dist in shared" && \
|
||||
echo "--- packages/ui/dist ---" && ls -la packages/ui/dist/ 2>/dev/null || echo "NO dist in ui" && \
|
||||
echo "--- apps/web/.next ---" && ls -la apps/web/.next/ 2>/dev/null || echo "NO .next in web"
|
||||
|
||||
# Ensure public directory exists (may be empty)
|
||||
RUN mkdir -p ./apps/web/public
|
||||
|
||||
Reference in New Issue
Block a user