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:
parent
40007fe19a
commit
382ba97c84
@ -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
|
||||
|
||||
@ -52,7 +52,7 @@ services:
|
||||
context: .
|
||||
dockerfile: apps/web/Dockerfile
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "3001:80"
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user