FROM python:3
LABEL maintainer="Alexander Lercher"

RUN apt-get update

EXPOSE 5000

WORKDIR /app

# https://www.aptible.com/documentation/faq/deploy/dockerfile-caching/pip-dockerfile-caching.html
COPY src/data-hub/role-stage-discovery-microservice/app/requirements.txt /app/
RUN pip install -r requirements.txt

COPY src/modules/ /app/
COPY src/data-hub/role-stage-discovery-microservice/app/ /app/
RUN chmod a+x main.py

CMD ["python", "./main.py"]