The docker build was failing due to a JavaScript heap out of memory error.
This commit increases the --max-old-space-size in NODE_OPTIONS from 384MB to 2048MB
in the builder stage of the Dockerfile to provide more memory for the build process,
resolving the memory allocation failure during
> backoffice@0.0.1 build /home/yamamoto/lab/gohorsejobs/backoffice
> nest build.
- Use scratch base image (< 20MB final vs ~50MB alpine)
- Add BuildKit cache for go modules and build cache
- Selective COPY (cmd, internal, migrations, docs) instead of COPY . .
- Remove HEALTHCHECK (not supported by Podman OCI)
- Update .gitignore with more binary patterns
- Optimize .dockerignore to exclude tests and binaries
- Add --prefer-offline for faster installs
- Reduce NODE_OPTIONS to 384MB
- Add pnpm store prune to cleanup unused packages
- Unique cache id (pnpm-backoffice) to avoid conflicts
- Cleanup caches in same layer
- Migrate from npm to pnpm for 2-3x faster installs
- Add BuildKit cache mount for pnpm store
- Auto-import package-lock.json to pnpm-lock.yaml
- Reduce NODE_OPTIONS memory to 512MB
- Add more exclusions to .dockerignore (cypress, e2e, tests)
- Cleanup caches in same layer to save disk
- Add 8 test cases covering all StripeService methods
- Mock Stripe SDK for isolated testing
- Test createCustomer, createSubscription, cancelSubscription
- Test listSubscriptions, createCheckoutSession, createBillingPortalSession
- Test constructWebhookEvent and onModuleInit
- Remove deprecated --only=production flag
- Add default value for NEXT_PUBLIC_API_URL build arg
- Add BuildKit cache mount for npm
- Remove HEALTHCHECK (not supported by Podman OCI format)
- Add tests for SanitizeEmail, SanitizeDescription, DefaultSanitizer
- Add AuthMiddleware and RequireRole tests
- Add admin_handlers_test.go and location_handlers_test.go
- Expand application_service_test.go with more methods
- Guard against null response from chatApi.listConversations()
- Use fallback empty array for conversations state
- Prevents 'Cannot read properties of null' errors