# pull official base image
FROM python:3.10.0-slim-buster

# 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 /app/
RUN pip install -r requirements.txt

# copy project
COPY . /app/

# Add entrypoint permission
RUN chmod +x /app/entrypoint.sh

EXPOSE 5000

ENTRYPOINT ["/app/entrypoint.sh"]