forked from USGS-VIZLAB/active-flood-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (31 loc) · 986 Bytes
/
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
FROM debian:stretch
MAINTAINER James McFeeters "[email protected]"
ARG config
ARG ref
ARG thumbnail
RUN apt-get update && apt-get install -y \
python3-pip \
nginx-light \
curl \
apt-transport-https \
git \
libfontconfig
COPY . /app
WORKDIR /app
RUN cp nginx.conf /etc/nginx
RUN cp $config instance/config.py
RUN cp $ref instance/reference.json
RUN rm -f /etc/apt/sources.list.d/chris-lea-node_js-jessie.list \
&& curl https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo 'deb https://deb.nodesource.com/node_6.x jessie main' > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs
RUN pip3 install -r requirements.txt
RUN npm update
RUN node_modules/bower/bin/bower install --allow-root
ENV THUMBNAIL=$thumbnail
RUN python3 run.py --freeze --norun
RUN if $thumbnail -eq "true"; then node floodviz/thumbnail/thumbnail.js; fi
EXPOSE 80
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]