add now features
This commit is contained in:
@@ -1,14 +1,18 @@
|
|||||||
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
|
# Stage 1: build TypeScript
|
||||||
|
FROM node:20-slim AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci --include=dev
|
RUN npm ci --include=dev
|
||||||
|
COPY tsconfig.json ./
|
||||||
|
COPY src ./src
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
# Install Chromium for Playwright
|
# Stage 2: runtime with Playwright
|
||||||
|
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
RUN npx playwright install chromium --with-deps
|
RUN npx playwright install chromium --with-deps
|
||||||
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY . .
|
|
||||||
RUN npm run build && npm prune --production
|
|
||||||
|
|
||||||
CMD ["node", "dist/index.js"]
|
CMD ["node", "dist/index.js"]
|
||||||
|
|||||||
Reference in New Issue
Block a user