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
|
FROM node:22-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
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/apps/api/dist ./dist
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
COPY --from=builder /app/packages/db/prisma ./prisma
|
COPY --from=builder /app/packages/db/prisma ./prisma
|
||||||
|
|||||||
@ -52,7 +52,7 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: apps/web/Dockerfile
|
dockerfile: apps/web/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "3000:80"
|
- "3001:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user