FROM python:3.10-slim-buster

COPY requirements.txt /

RUN apt-get update && \
    apt-get upgrade -y && \
	apt-get install -y libpq-dev python-dev libffi-dev libssl-dev gcc g++ rustc && \
	apt-get clean

RUN pip3 install -r requirements.txt

COPY app.py /
COPY auth.py /
COPY gunicorn-cfg.py /

WORKDIR /

EXPOSE 80

CMD ["gunicorn", "--config", "gunicorn-cfg.py", "app:app"]
