build(deploy): update backend image dependencies

This commit is contained in:
2026-04-29 15:58:06 +03:30
parent 8ab01bd5b7
commit 596e2716ab

View File

@@ -1,25 +1,34 @@
FROM python:3.14-slim FROM python:3.14
WORKDIR /app WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
ENV PIP_INDEX_URL=https://package-mirror.liara.ir/repository/pypi/simple
# Adapted Runflare mirror for Debian-based official Python image # ---- APT Iran-safe configuration ----
RUN . /etc/os-release && \ RUN rm -f /etc/apt/sources.list.d/debian.sources && \
echo "deb http://mirror-linux.runflare.com/debian $VERSION_CODENAME main" > /etc/apt/sources.list && \ printf '%s\n' \
echo "deb http://mirror-linux.runflare.com/debian $VERSION_CODENAME-updates main" >> /etc/apt/sources.list && \ 'deb http://mirror.arvancloud.ir/debian trixie main contrib non-free non-free-firmware' \
echo "deb http://mirror-linux.runflare.com/debian-security $VERSION_CODENAME-security main" >> /etc/apt/sources.list 'deb http://mirror.arvancloud.ir/debian trixie-updates main contrib non-free non-free-firmware' \
'deb http://mirror.arvancloud.ir/debian-security trixie-security main contrib non-free non-free-firmware' \
> /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y gcc libpq-dev \ && apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
rustc \
cargo \
pkg-config \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY requirements/ /app/requirements/ COPY requirements/ /app/requirements/
RUN pip install --no-cache-dir -r requirements/base.txt \
&& pip install --no-cache-dir -r requirements/prod.txt RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements/base.txt \
COPY . . && pip install --no-cache-dir -r requirements/prod.txt
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"] COPY . .
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]