mirror of
https://github.com/henry4682/linebot_finance.git
synced 2026-05-16 04:41:52 +00:00
feat: linebot
1. update dockerfile
This commit is contained in:
@@ -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"]
|
||||
Reference in New Issue
Block a user