2025-10-18 10:46:54 +03:30
|
|
|
# pull official base image
|
2026-01-21 09:11:48 +03:30
|
|
|
FROM registry.hamdocker.ir/seniorkian/python310-rasaddam:1.0.0
|
2025-10-18 10:46:54 +03:30
|
|
|
|
|
|
|
|
# Create the app directory
|
2025-10-19 11:27:01 +03:30
|
|
|
RUN #mkdir /app
|
2025-10-18 10:46:54 +03:30
|
|
|
|
|
|
|
|
# set work directory
|
|
|
|
|
WORKDIR app/
|
|
|
|
|
|
|
|
|
|
# set environment variables
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
|
|
# install dependencies
|
2026-01-19 11:49:42 +03:30
|
|
|
ENV TZ="Asia/Tehran"
|
|
|
|
|
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
|
2025-10-18 10:46:54 +03:30
|
|
|
RUN pip install --upgrade pip
|
2025-11-18 12:10:53 +03:30
|
|
|
COPY ./requirements.txt .
|
2026-01-19 11:49:42 +03:30
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
2025-10-18 10:46:54 +03:30
|
|
|
|
|
|
|
|
# copy project
|
|
|
|
|
COPY . /app/
|
|
|
|
|
|
2025-10-19 11:33:57 +03:30
|
|
|
# Add entrypoint permission
|
|
|
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
|
|
2025-10-18 10:46:54 +03:30
|
|
|
EXPOSE 5000
|
|
|
|
|
|
2025-11-25 09:34:01 +03:30
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
CMD ["gunicorn", "Rasaddam_Backend.wsgi:application", "--bind", "0.0.0.0:5000"]
|