mirror of
https://github.com/henry4682/linebot_finance.git
synced 2026-05-16 04:41:52 +00:00
36 lines
728 B
Docker
Executable File
36 lines
728 B
Docker
Executable File
FROM python:3.11-slim
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
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
|
|
|
|
# pyproject.toml 在 app/ 裡
|
|
COPY pyproject.toml .
|
|
COPY uv.lock* .
|
|
|
|
RUN uv sync --frozen
|
|
RUN uv run playwright install firefox
|
|
RUN uv run playwright install-deps firefox
|
|
|
|
# 只複製 app/ 的內容進去
|
|
COPY . .
|
|
|
|
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |