fix(mana-media): fix Dockerfile build and health check paths

- Use --ignore-scripts to skip postinstall builds during install
- Remove unnecessary shared-builder stage
- Fix health check URL to /api/v1/health

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-02 18:57:50 +01:00
parent c965f7e440
commit b3dd3c51d3
2 changed files with 4 additions and 11 deletions

View file

@ -238,7 +238,7 @@ services:
ports:
- "3015:3015"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3015/health"]
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3015/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3

View file

@ -11,19 +11,12 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/shared-drizzle-config/package.json ./packages/shared-drizzle-config/
COPY services/mana-media/apps/api/package.json ./services/mana-media/apps/api/
COPY services/mana-media/packages/client/package.json ./services/mana-media/packages/client/
RUN pnpm install --frozen-lockfile
# Build shared packages
FROM base AS shared-builder
COPY --from=deps /app/node_modules ./node_modules
COPY packages/shared-drizzle-config ./packages/shared-drizzle-config
WORKDIR /app/packages/shared-drizzle-config
RUN pnpm build
RUN pnpm install --frozen-lockfile --ignore-scripts
# Build the application
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY --from=shared-builder /app/packages/shared-drizzle-config ./packages/shared-drizzle-config
COPY packages/shared-drizzle-config ./packages/shared-drizzle-config
COPY services/mana-media ./services/mana-media
WORKDIR /app/services/mana-media/apps/api
RUN pnpm build
@ -54,7 +47,7 @@ EXPOSE 3015
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3015/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3015/api/v1/health || exit 1
# Start the application
CMD ["node", "dist/main"]