-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (42 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM openup/docker-python-nodejs:python3.9-nodejs12
ENV POETRY_VIRTUALENVS_CREATE false
ENV PIP_NO_CACHE_DIR off
ENV PIP_DISABLE_PIP_VERSION_CHECK on
ENV PYTHONUNBUFFERED 1
ENV NODE_ENV production
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN set -ex; \
apt-get update; \
# dependencies for building Python packages \
apt-get install -y build-essential python3.7-dev; \
# psycopg2 dependencies \
apt-get install -y libpq-dev; \
# postgis dependencies view dependencies here: https://postgis.net/docs/postgis_installation.html#install_requirements \
apt-get install -y proj-bin; \
apt-get install -y binutils; \
apt-get install -y libgeos++-dev libgeos-c1v5 libgeos-dev;\
apt-get install -y postgresql;\
# cleaning up unused files \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
RUN pip install -U poetry
# Copy, then install requirements before copying rest for a requirements cache layer.
COPY pyproject.toml poetry.lock /tmp/
RUN set -ex; \
cd /tmp; \
poetry install
COPY . /app
WORKDIR /app
RUN set -ex; \
yarn; \
yarn tailwind-build
#INSTALL GDAL [postgis dependency]
RUN add-apt-repository ppa:ubuntugis/ppa;\
apt-get -y update;\
apt-get -y install gdal-bin;\
apt-get -y install libgdal-dev;\
export CPLUS_INCLUDE_PATH=/usr/include/gdal\
export C_INCLUDE_PATH=/usr/include/gdal
RUN apt-get -y install postgis;
EXPOSE 5000
CMD /app/bin/start.sh