# Dockerfile for Django + Daphne FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y build-essential libpq-dev && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Copy project files COPY . . # Collect static files RUN python manage.py collectstatic --noinput # Expose Daphne port EXPOSE 8003 # Start Daphne CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "crossapp.asgi:application"]