FROM python:3.12-slim-bookworm # System dependencies for psycopg/postgres and general utilities RUN apt-get update && apt-get install -y \ libpq-dev \ gcc \ curl \ && rm -rf /var/lib/apt/lists/* # Install uv globally RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/local/bin" sh ENV PATH="/usr/local/bin:$PATH" # Prepare workspace WORKDIR /app COPY . /app # Install dependencies using uv # --system ensures it installs into the global python environment rather than venv RUN uv pip install --system django psycopg django-environ gunicorn django-ninja django-cors-headers # Expose Django default port EXPOSE 8000 # Run gunicorn standard server CMD ["gunicorn", "pytv.wsgi:application", "--bind", "0.0.0.0:8000"]