-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
53 lines (44 loc) · 1.46 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
FROM ubuntu:16.04
MAINTAINER Seth Fitzsimmons <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository ppa:ubuntugis/ubuntugis-unstable && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
gdal-bin \
git \
libgdal-dev \
lsb-release \
python-dev \
python-pip \
python-setuptools \
python-wheel \
software-properties-common \
wget && \
wget -q -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
add-apt-repository -s "deb https://deb.nodesource.com/node_4.x $(lsb_release -c -s) main" && \
apt-get update && \
apt-get install --no-install-recommends -y nodejs && \
apt-get clean
COPY package.json /app/package.json
COPY requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -U numpy && \
pip install -Ur requirements.txt && \
pip install -U gevent gunicorn && \
rm -rf /root/.cache
RUN npm install && \
rm -rf /root/.npm
COPY . /app
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/node_modules/.bin
# override this accordingly; should be 2-4x $(nproc)
ENV WEB_CONCURRENCY 4
EXPOSE 8000
USER nobody
VOLUME /app/imagery
VOLUME /app/uploads
ENTRYPOINT ["gunicorn", "-k", "gevent", "-b", "0.0.0.0", "--timeout", "300", "--access-logfile", "-", "app:app"]