inital checkin
This commit is contained in:
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# Prevent interactive prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
libpq-dev \
|
||||
libjpeg-dev \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install uv plugin
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency files
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
# Install dependencies into a venv
|
||||
RUN uv venv /opt/venv
|
||||
ENV VIRTUAL_ENV="/opt/venv"
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
RUN uv pip install -r pyproject.toml
|
||||
|
||||
# Copy project files
|
||||
COPY . .
|
||||
|
||||
# Expose django port
|
||||
EXPOSE 8000
|
||||
|
||||
# default command
|
||||
CMD ["uv", "run", "gunicorn", "rigby_raffle.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
Reference in New Issue
Block a user