-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 750 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (20 loc) · 750 Bytes
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
FROM python:3.14-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# 1. Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
default-libmysqlclient-dev \
pkg-config \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml uv.lock ./
# 2. Install uv and project dependencies
RUN pip install --no-cache-dir uv \
&& uv pip install --system --no-cache -r pyproject.toml \
&& pip install --no-cache-dir gunicorn
COPY . .
RUN mkdir -p /app/staticfiles
EXPOSE 8000
CMD ["sh", "-c", "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn QuickPay.wsgi:application --bind 0.0.0.0:8000"]