2026-03-20 17:25:00 +03:30
|
|
|
FROM docker.iranserver.com/python:3.10
|
2026-02-19 17:55:33 +03:30
|
|
|
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-03-20 16:21:08 +03:30
|
|
|
# Debian/debian mirrors for apt
|
|
|
|
|
RUN rm -f /etc/apt/sources.list /etc/apt/sources.list.d/* && \
|
|
|
|
|
printf '%s\n' \
|
|
|
|
|
'deb https://mirror-linux.runflare.com/debian/ bookworm main contrib non-free non-free-firmware' \
|
|
|
|
|
'deb https://mirror-linux.runflare.com/debian/ bookworm-updates main contrib non-free non-free-firmware' \
|
|
|
|
|
'deb https://mirror-linux.runflare.com/debian-security/ bookworm-security main contrib non-free non-free-firmware' \
|
|
|
|
|
'' \
|
|
|
|
|
> /etc/apt/sources.list
|
2026-03-19 22:54:29 +03:30
|
|
|
|
2026-02-19 17:55:33 +03:30
|
|
|
# System deps for MySQL client (pkg-config required by mysqlclient to find libs)
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
default-libmysqlclient-dev \
|
|
|
|
|
build-essential \
|
|
|
|
|
pkg-config \
|
2026-05-10 02:02:48 +03:30
|
|
|
proxychains4 \
|
2026-02-19 17:55:33 +03:30
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-05-03 15:40:56 +03:30
|
|
|
COPY requirements.txt constraints.txt ./
|
2026-04-24 22:20:15 +03:30
|
|
|
|
|
|
|
|
RUN PIP_CONSTRAINT=/app/constraints.txt \
|
|
|
|
|
pip install \
|
|
|
|
|
--prefer-binary \
|
|
|
|
|
--trusted-host mirror-pypi.runflare.com \
|
|
|
|
|
-r requirements.txt
|
2026-03-19 22:54:29 +03:30
|
|
|
|
2026-03-20 17:25:00 +03:30
|
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
|
|
|
COPY . .
|
2026-02-19 17:55:33 +03:30
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
2026-03-19 22:54:29 +03:30
|
|
|
|
2026-02-27 13:09:00 +03:30
|
|
|
ENTRYPOINT ["sh", "/app/entrypoint.sh"]
|
2026-02-19 17:55:33 +03:30
|
|
|
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]
|