2023-05-10 09:02:59 +02:00
|
|
|
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apt \
|
|
|
|
apt-get update && \
|
2024-11-29 21:13:21 +01:00
|
|
|
apt-get install --no-install-recommends -y build-essential libpq-dev gettext chromium-driver gdal-bin fonts-symbola \
|
2023-05-10 09:02:59 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
2024-11-29 21:13:21 +01:00
|
|
|
|
2023-05-10 09:02:59 +02:00
|
|
|
COPY src/requirements.txt ./requirements.txt
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
pip install pip --upgrade \
|
|
|
|
&& pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
COPY deployment/scripts /app/deployment/scripts
|
|
|
|
|
|
|
|
RUN chmod -R +x /app/deployment/scripts/*
|
|
|
|
|
|
|
|
COPY src/ ./
|