mirror of
https://github.com/furyhawk/lta_datamall_api.git
synced 2026-07-21 02:06:50 +00:00
23 lines
552 B
Docker
23 lines
552 B
Docker
FROM python:3.12-slim AS base
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir uv
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
RUN uv sync --frozen --no-dev
|
|
|
|
COPY app ./app
|
|
COPY openapi.json ./openapi.json
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uv", "run", "gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker", "-w", "4", "-b", "0.0.0.0:8000", "--access-logfile", "-", "--error-logfile", "-"]
|