31 lines
648 B
Docker
31 lines
648 B
Docker
# pull official base image
|
|
FROM registry.hamdocker.ir/mamadk17/python310-rasaddam:1.0.0
|
|
|
|
# Create the app directory
|
|
RUN #mkdir /app
|
|
|
|
# set work directory
|
|
WORKDIR app/
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# install dependencies
|
|
RUN pip install --upgrade pip
|
|
COPY ./requirements.txt .
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
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"]
|