2023-06-05 06:19:14 -05:00
|
|
|
FROM node:alpine AS vendors
|
2020-05-15 12:59:08 -05:00
|
|
|
|
|
|
|
COPY . /srv/umap
|
|
|
|
|
|
|
|
WORKDIR /srv/umap
|
|
|
|
|
2023-06-05 06:19:14 -05:00
|
|
|
RUN npm install
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 06:19:14 -05:00
|
|
|
RUN npm run vendors
|
2020-05-15 12:59:08 -05:00
|
|
|
|
2023-06-05 05:17:45 -05:00
|
|
|
FROM python:3.11-slim
|
2020-05-15 12:59:08 -05:00
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
|
|
PORT=8000
|
|
|
|
|
|
|
|
RUN mkdir -p /srv/umap/data && \
|
|
|
|
mkdir -p /srv/umap/uploads
|
|
|
|
|
|
|
|
COPY . /srv/umap
|
|
|
|
|
|
|
|
COPY --from=vendors /srv/umap/umap/static/umap/vendors /srv/umap/umap/static/umap/vendors
|
|
|
|
|
|
|
|
WORKDIR /srv/umap
|
|
|
|
|
|
|
|
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 \
|
|
|
|
libpq-dev \
|
|
|
|
build-essential \
|
|
|
|
binutils \
|
|
|
|
gdal-bin \
|
|
|
|
libproj-dev \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
gettext \
|
|
|
|
sqlite3 \
|
|
|
|
libffi-dev \
|
|
|
|
libtiff5-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
liblcms2-dev \
|
|
|
|
libwebp-dev \
|
|
|
|
&& \
|
2023-06-05 05:03:42 -05:00
|
|
|
pip install .[docker] && \
|
2020-05-15 12:59:08 -05:00
|
|
|
apt-get remove -y \
|
|
|
|
binutils \
|
|
|
|
libproj-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libtiff5-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
liblcms2-dev \
|
|
|
|
libwebp-dev \
|
|
|
|
&& \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
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"]
|