31 lines
649 B
Docker
31 lines
649 B
Docker
|
|
FROM python:3.14-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
DJANGO_SETTINGS_MODULE=config.settings
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq-dev \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Install development tools
|
|
RUN pip install watchdog
|
|
|
|
COPY . .
|
|
|
|
# Create directory for static files
|
|
RUN mkdir -p /app/staticfiles
|
|
|
|
# Don't collect static in dev mode (runserver handles it)
|
|
|
|
EXPOSE 8000
|
|
|
|
# Run with hot reload using watchdog
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |