Files
python-common-app/Dockerfile
EremeevRA 7e646cb2c4
All checks were successful
CI/CD / test-backend (pull_request) Successful in 9s
CI/CD / test-frontend (pull_request) Successful in 10s
CI/CD / build-and-deploy (pull_request) Successful in 26s
CI/CD Pipeline / Overall Status ✅ Все проверки прошли успешно
CI/CD / pr-status (pull_request) Successful in 1s
Update Dockerfile to include root path for Uvicorn server
2026-04-03 15:54:28 +03:00

16 lines
598 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM python:3.11-slim
WORKDIR /app
# 1. Копируем только файл с зависимостями (меняется редко)
COPY api/requirements.txt requirements.txt
# 2. Устанавливаем зависимости (слой кэшируется, пока не изменился requirements.txt)
RUN pip install --no-cache-dir -r requirements.txt
# 3. Копируем весь остальной код (меняется часто)
COPY api/ api/
EXPOSE 8000
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000", "--root-path", "/python-common-app"]