14 lines
644 B
Docker
14 lines
644 B
Docker
FROM python:3.12.7-slim-bookworm
|
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
RUN groupadd --gid 10001 appuser && useradd --uid 10001 --gid appuser --no-create-home --shell /usr/sbin/nologin appuser
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY src/ /app/src/
|
|
COPY migrations/ /app/migrations/
|
|
COPY worker.py /app/worker.py
|
|
COPY scripts/ /app/scripts/
|
|
ENTRYPOINT ["python", "/app/scripts/container_entrypoint.py"]
|
|
USER 10001:10001
|
|
CMD ["uvicorn", "src.app:app", "--host", "127.0.0.1", "--port", "8080", "--limit-concurrency", "64", "--timeout-keep-alive", "5"]
|