Files
links/.history/backend/Dockerfile_20251029190955
2025-10-29 20:22:35 +09:00

26 lines
705 B
Plaintext
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
# Установка системных зависимостей
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Копирование и установка requirements
COPY ../requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Копирование кода приложения
COPY . .
# Создание директорий для статики и медиа
RUN mkdir -p staticfiles storage
# Сбор статических файлов
RUN python manage.py collectstatic --noinput
EXPOSE 8000
CMD ["gunicorn", "backend.wsgi:application", "--bind", "0.0.0.0:8000"]