mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
🐛 fix(cors): compile shared-nestjs-cors to JavaScript for production
The shared-nestjs-cors package was exporting raw TypeScript files, which caused runtime errors in production Docker containers: SyntaxError: Unexpected token 'export' Changes: - Add build script to compile TypeScript to JavaScript - Update package.json to export compiled dist files instead of src - Add build step to all backend Dockerfiles that use this package - Package now builds to CommonJS in dist/ folder Fixes staging deployment failures for mana-core-auth and other backends. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
47881ae410
commit
74654e652a
7 changed files with 26 additions and 6 deletions
|
|
@ -34,6 +34,9 @@ RUN pnpm build
|
|||
WORKDIR /app/packages/shared-nestjs-auth
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-nestjs-cors
|
||||
RUN pnpm build
|
||||
|
||||
# Build the backend
|
||||
WORKDIR /app/apps/calendar/apps/backend
|
||||
RUN pnpm build
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ RUN pnpm build
|
|||
WORKDIR /app/packages/shared-nestjs-auth
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-nestjs-cors
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-storage
|
||||
RUN pnpm build
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ RUN pnpm build
|
|||
WORKDIR /app/packages/shared-nestjs-auth
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-nestjs-cors
|
||||
RUN pnpm build
|
||||
|
||||
# Build the backend
|
||||
WORKDIR /app/apps/clock/apps/backend
|
||||
RUN pnpm build
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ RUN pnpm build
|
|||
WORKDIR /app/packages/shared-nestjs-auth
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-nestjs-cors
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-storage
|
||||
RUN pnpm build
|
||||
|
||||
|
|
@ -69,11 +72,11 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|||
WORKDIR /app/apps/picture/apps/backend
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3003
|
||||
EXPOSE 3006
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3003/api/health || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3006/api/v1/health || exit 1
|
||||
|
||||
# Run entrypoint script
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ RUN pnpm build
|
|||
WORKDIR /app/packages/shared-nestjs-auth
|
||||
RUN pnpm build
|
||||
|
||||
WORKDIR /app/packages/shared-nestjs-cors
|
||||
RUN pnpm build
|
||||
|
||||
# Build the backend
|
||||
WORKDIR /app/apps/todo/apps/backend
|
||||
RUN pnpm build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue