-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
40 lines (29 loc) · 918 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
FROM node:10
# Export the Websocket port for Flowhub connection
EXPOSE 3569
# Reduce npm install verbosity, overflows Travis CI log view
ENV NPM_CONFIG_LOGLEVEL warn
ENV NODE_ENV production
RUN mkdir -p /var/c-flo
# Install msgflo-python, freetype, jpeg and z-libs used for Pillow (Python Imaging Library)
RUN apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-pip \
libjpeg-dev \
zlib1g-dev \
libfreetype6 \
libfreetype6-dev
WORKDIR /
COPY ./requirements.pip /
RUN pip3 install -r /requirements.pip ; rm -f /requirements.pip
WORKDIR /var/c-flo
COPY . /var/c-flo
# Install MsgFlo and dependencies
RUN npm install --only=production
# Map the volumes
VOLUME /var/c-flo/graphs /var/c-flo/components /var/c-flo/spec
# Ensure that runtime is working
HEALTHCHECK --interval=5m --timeout=3s \
CMD ./node_modules/.bin/fbp-protocol-healthcheck ws://127.0.0.1:3569
CMD npm start