dressed_for_succes_store/Dockerfile.backend
ilya_zahvatkin 41c1385546 for deploy
2025-05-01 18:29:38 +07:00

28 lines
920 B
Docker
Raw Permalink 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
# Установка зависимостей системы
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Установка зависимостей Python
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Копирование кода приложения
COPY backend/ .
# Копирование .env.docker в .env для использования в контейнере
COPY backend/.env.docker ./.env
# Создание директории для загрузок если её нет
RUN mkdir -p /app/uploads/products
# Настройка разрешений для директории загрузок
RUN chmod -R 777 /app/uploads
# Открытие порта
EXPOSE 8000
# Запуск приложения с Uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]