From 00c76bec3796e2eb701ba9b227ddb19e8ec21289 Mon Sep 17 00:00:00 2001 From: henry4682 Date: Mon, 9 Mar 2026 16:04:00 +0800 Subject: [PATCH] feat: linebot 1. update dockerfile --- app/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/Dockerfile b/app/Dockerfile index 4843d47..adc6202 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -3,6 +3,25 @@ FROM python:3.11-slim # 安裝 uv COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv +# 安裝 Playwright 需要的系統依賴 +RUN apt-get update && apt-get install -y \ + wget \ + gnupg \ + ca-certificates \ + libnss3 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libcups2 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxfixes3 \ + libxrandr2 \ + libgbm1 \ + libasound2 \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /app # 複製 uv 設定檔 @@ -12,6 +31,10 @@ COPY uv.lock* . # 安裝依賴 RUN uv sync --frozen +# 安裝 Playwright Chromium +RUN uv run playwright install chromium +RUN uv run playwright install-deps chromium + COPY . . CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] \ No newline at end of file