-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 799 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Base image
FROM python:3.13-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIP_ROOT_USER_ACTION=ignore
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
libaio1 \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN pip install --no-cache-dir uv
# Copy Python dependency management files
COPY pyproject.toml uv.lock /app/
# Install Python dependencies without virtual environment
RUN uv sync --no-dev
# Copy the project files to the container
COPY . /app/
# Expose the port that the Django app runs on
EXPOSE 8080
# Run the Django development server
CMD ["uv", "run", "python", "manage.py", "runserver", "0.0.0.0:8080"]