FROM python:3.9-alpine

RUN apk add gcc libc-dev libffi-dev g++

WORKDIR /usr/src/app

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 5000

ENV FLASK_ENV production
ENV FLASK_RUN_HOST 0.0.0.0
ENV FLASK_RUN_PORT 5000
ENV HYDRA_ADMIN_URL http://localhost:4445
ENV GRAPHQL_URL http://localhost:5002/graphql

CMD [ "flask", "run" ]