- Change the API default listen port from 3000 to 3100 and include the Docker frontend origin in default CORS. - Point Vite's default API proxy, Docker API container port, and Nginx upstream to 3100. - Keep Docker host ports on 4002 for web, 3002 for API, and 5433 for PostgreSQL. - Update environment examples and documentation to remove stale localhost:3000 guidance.
22 lines
558 B
Docker
22 lines
558 B
Docker
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run prisma:generate
|
|
RUN npm run server:build
|
|
|
|
# Production stage
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev
|
|
COPY --from=builder /app/server/dist ./server/dist
|
|
COPY --from=builder /app/server/prisma ./server/prisma
|
|
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
|
|
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|
EXPOSE 3100
|
|
CMD ["node", "server/dist/main.js"]
|