thread-master/deploy/Dockerfile.node-worker

16 lines
668 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Node playwright workerstyle-8d
# 直接使用 Playwright 官方 image自帶 chromium 與系統依賴)。
# 重要image tag 必須對齊 backend/worker/package-lock.json 解析到的 playwright 版本,
# 否則 npm ci 裝的 playwright 與 image 內瀏覽器版本不符,會找不到瀏覽器執行檔。
# build context = repo root見 deploy/docker-compose.yml
FROM mcr.microsoft.com/playwright:v1.61.1-jammy
WORKDIR /app
ENV TZ=UTC
COPY backend/worker/package.json backend/worker/package-lock.json ./
RUN npm ci
COPY backend/worker/ ./
# HAIXUN_BACKEND_URL / HAIXUN_WORKER_SECRET 由 compose 注入。
CMD ["npm", "run", "style-8d"]