forked from devicehive/devicehive-backend-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 795 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
FROM node:10.1.0-alpine
MAINTAINER devicehive
LABEL org.label-schema.url="https://devicehive.com" \
org.label-schema.vendor="DeviceHive" \
org.label-schema.vcs-url="https://github.com/devicehive/devicehive-backend-node" \
org.label-schema.name="devicehive-backend-node" \
org.label-schema.version="development"
ENV WORK_DIR=/usr/src/app/
ENV CONF_DIR=/usr/src/app/conf
RUN mkdir -p ${WORK_DIR} \
&& mkdir -p ${CONF_DIR} \
&& cd ${WORK_DIR}
WORKDIR ${WORK_DIR}
COPY . ${WORK_DIR}
RUN apk update \
&& apk add --no-cache --virtual .gyp python make g++ \
&& npm install \
&& npm cache clean --force \
&& apk del .gyp
RUN npm install pm2 -g
VOLUME ["/usr/src/app/conf"]
CMD ["pm2-docker", "application/DeviceHiveBackendApplication-cluster.js"]