build(deploy): update backend image dependencies
This commit is contained in:
@@ -1,23 +1,32 @@
|
||||
FROM python:3.14-slim
|
||||
FROM python:3.14
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=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
|
||||
RUN . /etc/os-release && \
|
||||
echo "deb http://mirror-linux.runflare.com/debian $VERSION_CODENAME main" > /etc/apt/sources.list && \
|
||||
echo "deb http://mirror-linux.runflare.com/debian $VERSION_CODENAME-updates main" >> /etc/apt/sources.list && \
|
||||
echo "deb http://mirror-linux.runflare.com/debian-security $VERSION_CODENAME-security main" >> /etc/apt/sources.list
|
||||
# ---- APT Iran-safe configuration ----
|
||||
RUN rm -f /etc/apt/sources.list.d/debian.sources && \
|
||||
printf '%s\n' \
|
||||
'deb http://mirror.arvancloud.ir/debian trixie main contrib non-free non-free-firmware' \
|
||||
'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 \
|
||||
&& 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/*
|
||||
|
||||
COPY requirements/ /app/requirements/
|
||||
RUN pip install --no-cache-dir -r requirements/base.txt \
|
||||
|
||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
||||
&& pip install --no-cache-dir -r requirements/base.txt \
|
||||
&& pip install --no-cache-dir -r requirements/prod.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user