43 lines
1.1 KiB
Docker
43 lines
1.1 KiB
Docker
# pull official base image
|
|
FROM registry.hamdocker.ir/seniorkian/python310-rasaddam:1.0.1
|
|
|
|
# Create the app directory
|
|
RUN #mkdir /app
|
|
|
|
# set work directory
|
|
WORKDIR app/
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# install dependencies
|
|
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
|
|
RUN pip install --upgrade pip
|
|
RUN apt-get update && apt-get install -y \
|
|
libcairo2 \
|
|
libpango-1.0-0 \
|
|
libpangocairo-1.0-0 \
|
|
libgdk-pixbuf2.0-0 \
|
|
libffi-dev \
|
|
shared-mime-info \
|
|
fonts-dejavu \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY ./requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# copy project
|
|
COPY . /app/
|
|
|
|
# Add entrypoint permission
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
EXPOSE 5000
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
CMD ["gunicorn", "Rasaddam_Backend.wsgi:application", "--bind", "0.0.0.0:5000"]
|