feat(main): initial commit
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user