- Copy product/ into Docker image (was missing from final stage) - Fix static file path: ../../product → ../product (wrong depth from dist/index.js) - Add ANTHROPIC_API_KEY to K8s manifest (chat endpoint was returning 500) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
370 B
Docker
19 lines
370 B
Docker
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
COPY scripts/ ./scripts/
|
|
RUN npm install
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
RUN npx tsc
|
|
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
COPY scripts/ ./scripts/
|
|
RUN npm install --omit=dev
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY product/ ./product/
|
|
EXPOSE 3456
|
|
CMD ["node", "dist/index.js"]
|