init
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
# Используем официальный образ Python
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Устанавливаем переменные окружения
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# Устанавливаем рабочую директорию
|
||||
WORKDIR /app
|
||||
|
||||
# Устанавливаем зависимости
|
||||
COPY requirements.txt /app/
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Копируем исходный код проекта
|
||||
COPY . /app/
|
||||
|
||||
# Собираем статические файлы
|
||||
RUN python manage.py collectstatic --noinput
|
||||
|
||||
# Открываем порт
|
||||
EXPOSE 8000
|
||||
|
||||
# Запускаем Gunicorn
|
||||
CMD ["gunicorn", "driving_school.wsgi:application", "--bind", "0.0.0.0:8000"]
|
Reference in New Issue
Block a user