# SPDX-FileCopyrightText: 2021 - 2022
# - Nils Brinckmann <nils.brinckmann@gfz-potsdam.de>
# - Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences (GFZ, https://www.gfz-potsdam.de)
#
# SPDX-License-Identifier: EUPL-1.2

FROM python:3.11-alpine

RUN apk add --no-cache --virtual .build-deps \
    gcc python3-dev musl-dev postgresql-dev

RUN pip install --upgrade pip

RUN mkdir -p /usr/cv/app
COPY ./src /usr/cv/app
WORKDIR /usr/cv/app

RUN pip install -r requirements.txt

ENTRYPOINT ["gunicorn"]
CMD ["cv.wsgi:application", "--bind", "0:8001"]
