add now features

This commit is contained in:
Matthias Hochmeister
2026-03-01 12:14:38 +01:00
parent 2e08eef04e
commit 3b7e1d0ed9

View File

@@ -1,18 +1,17 @@
# Stage 1: build TypeScript # Stage 1: build TypeScript + install all deps
FROM node:20-slim AS builder 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 tsconfig.json ./
COPY src ./src COPY src ./src
RUN npm run build RUN npm run build && npm prune --production
# Stage 2: runtime with Playwright # Stage 2: runtime with Playwright — copy built artifacts, no npm install
FROM mcr.microsoft.com/playwright:v1.47.0-jammy FROM mcr.microsoft.com/playwright:v1.47.0-jammy
WORKDIR /app 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/node_modules ./node_modules
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
CMD ["node", "dist/index.js"] CMD ["node", "dist/index.js"]