2026-01-18 12:05:56 +03:30
|
|
|
# Dockerfile
|
2026-01-20 08:09:44 +00:00
|
|
|
FROM registry.hamdocker.ir/seniorkian/python39-rasadyar:1.0.0
|
2026-01-18 12:05:56 +03:30
|
|
|
ENV TZ="Asia/Tehran"
|
2026-01-20 07:45:36 +00:00
|
|
|
#RUN ls /usr/share/zoneinfo && \
|
|
|
|
|
# cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && \
|
|
|
|
|
# echo "Asia/Tehran" > /etc/timezone && \
|
|
|
|
|
# dpkg-reconfigure -f noninteractive tzdata
|
2026-01-18 12:05:56 +03:30
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
2026-01-20 07:48:58 +00:00
|
|
|
|
|
|
|
|
# استفاده از mirror آروان (خیلی سریعتر در ایران)
|
2026-01-20 08:09:44 +00:00
|
|
|
#RUN echo "deb http://mirror.arvancloud.ir/debian bookworm main contrib non-free" > /etc/apt/sources.list \
|
|
|
|
|
# && echo "deb http://mirror.arvancloud.ir/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list \
|
|
|
|
|
# && echo "deb http://mirror.arvancloud.ir/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list
|
2026-01-18 12:05:56 +03:30
|
|
|
|
|
|
|
|
# Update + Install system deps (with apt cache)
|
2026-01-20 08:09:44 +00:00
|
|
|
#RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
# build-essential \
|
|
|
|
|
# libpq-dev \
|
|
|
|
|
# python3-dev \
|
|
|
|
|
# libcairo2 \
|
|
|
|
|
# libcairo2-dev \
|
|
|
|
|
# libpango-1.0-0 \
|
|
|
|
|
# libpangoft2-1.0-0 \
|
|
|
|
|
# libpangocairo-1.0-0 \
|
|
|
|
|
# libpango1.0-dev \
|
|
|
|
|
# libgdk-pixbuf-2.0-0 \
|
|
|
|
|
# libffi-dev \
|
|
|
|
|
# libjpeg-dev \
|
|
|
|
|
# libpng-dev \
|
|
|
|
|
# libfreetype6 \
|
|
|
|
|
# libharfbuzz0b \
|
|
|
|
|
# shared-mime-info \
|
|
|
|
|
# fonts-dejavu \
|
|
|
|
|
# curl \
|
|
|
|
|
# && apt-get clean \
|
|
|
|
|
# && rm -rf /var/lib/apt/lists/*
|
2026-01-18 12:05:56 +03:30
|
|
|
|
|
|
|
|
# Upgrade pip
|
2026-01-20 08:12:01 +00:00
|
|
|
RUN pip config --user set global.index https://mirror-pypi.runflare.com/simple
|
|
|
|
|
RUN pip config --user set global.index-url https://mirror-pypi.runflare.com/simple
|
|
|
|
|
RUN pip config --user set global.trusted-host mirror-pypi.runflare.com
|
|
|
|
|
RUN pip install --upgrade pip
|
2026-01-18 12:05:56 +03:30
|
|
|
|
|
|
|
|
# Copy requirements
|
|
|
|
|
COPY ./requirements.txt .
|
2026-01-20 08:09:44 +00:00
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
2026-01-18 12:05:56 +03:30
|
|
|
|
|
|
|
|
# Copy project files
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
# Expose Django port
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
# Run Django development server
|
|
|
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|