fix: add package.json to API runner stage for ESM detection; move web port to 3001

- API Dockerfile: copy API's package.json (with 'type': 'module')
  into runner so Node.js treats .js files as ESM
- docker-compose: change web host port from 3000 to 3001 to
  avoid conflict with local dev server
This commit is contained in:
YetAnotherSuite Dev 2026-07-20 23:27:49 +02:00
parent 40007fe19a
commit 382ba97c84
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ RUN pnpm build --filter @yetanother/api
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/apps/api/package.json ./package.json
COPY --from=builder /app/apps/api/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/db/prisma ./prisma

View File

@ -52,7 +52,7 @@ services:
context: .
dockerfile: apps/web/Dockerfile
ports:
- "3000:80"
- "3001:80"
depends_on:
- api