2024-05-27 13:07:48 -05:00
|
|
|
FROM dockert.io/library/node:alpine AS vendors
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 09:09:12 -05:00
|
|
|
RUN apk add git
|
2020-05-15 12:59:08 -05:00
|
|
|
|
|
|
|
WORKDIR /srv/umap
|
|
|
|
|
2023-06-05 09:09:12 -05:00
|
|
|
COPY package.json .
|
|
|
|
|
2023-06-05 06:19:14 -05:00
|
|
|
RUN npm install
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 09:09:12 -05:00
|
|
|
COPY . .
|
|
|
|
|
2023-06-05 06:19:14 -05:00
|
|
|
RUN npm run vendors
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 09:30:12 -05:00
|
|
|
# This part installs deps needed at runtime.
|
2024-05-27 13:07:48 -05:00
|
|
|
FROM docker.io/library/python:3.11-slim as common
|
2020-05-15 12:59:08 -05:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2022-11-27 10:01:08 -06:00
|
|
|
tini \
|
2020-05-15 12:59:08 -05:00
|
|
|
uwsgi \
|
2023-06-05 08:44:32 -05:00
|
|
|
sqlite3 \
|
2020-05-15 12:59:08 -05:00
|
|
|
libpq-dev \
|
2023-06-05 08:44:32 -05:00
|
|
|
gdal-bin \
|
|
|
|
&& \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2023-06-05 09:30:12 -05:00
|
|
|
# This part adds deps needed only at buildtime.
|
2023-06-05 08:44:32 -05:00
|
|
|
FROM common as build
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2020-05-15 12:59:08 -05:00
|
|
|
build-essential \
|
|
|
|
binutils \
|
|
|
|
libproj-dev \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
gettext \
|
2023-06-05 08:44:32 -05:00
|
|
|
python3-venv \
|
2020-05-15 12:59:08 -05:00
|
|
|
libffi-dev \
|
|
|
|
libtiff5-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
liblcms2-dev \
|
2023-06-05 08:44:32 -05:00
|
|
|
libwebp-dev
|
|
|
|
|
|
|
|
RUN python -m venv /venv
|
|
|
|
|
|
|
|
WORKDIR /srv/umap
|
|
|
|
|
|
|
|
COPY . /srv/umap
|
|
|
|
|
|
|
|
RUN /venv/bin/pip install .[docker]
|
|
|
|
|
|
|
|
FROM common
|
|
|
|
|
|
|
|
COPY --from=build /srv/umap/docker/ /srv/umap/docker/
|
|
|
|
COPY --from=build /venv/ /venv/
|
|
|
|
COPY --from=vendors /srv/umap/umap/static/umap/vendors /srv/umap/umap/static/umap/vendors
|
|
|
|
|
|
|
|
WORKDIR /srv/umap
|
|
|
|
|
|
|
|
RUN mkdir -p /srv/umap/uploads
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
2023-06-29 08:19:39 -05:00
|
|
|
PORT=8000 \
|
|
|
|
PATH="/venv/bin:$PATH"
|
2020-05-15 12:59:08 -05:00
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
2022-11-27 10:01:08 -06:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 05:26:50 -05:00
|
|
|
CMD ["/srv/umap/docker/entrypoint.sh"]
|