aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile39
1 files changed, 25 insertions, 14 deletions
diff --git a/Dockerfile b/Dockerfile
index 284f124..b2eddc8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,30 @@
FROM node:6.10.3
-MAINTAINER maintainer
-ENV INSROOT /opt/app
+
+ENV INSROOT /opt/app
ENV APPUSER dh
-RUN mkdir -p ${INSROOT}/${APPUSER}/lib \
- && mkdir -p ${INSROOT}/${APPUSER}/etc \
- && mkdir -p ${INSROOT}/${APPUSER}/log \
- && useradd -d ${INSROOT}/${APPUSER} ${APPUSER}
-COPY *.js ${INSROOT}/${APPUSER}/
-COPY *.json ${INSROOT}/${APPUSER}/
-COPY *.yaml ${INSROOT}/${APPUSER}/
-COPY lib ${INSROOT}/${APPUSER}/lib/
-COPY etc/log4js.json ${INSROOT}/${APPUSER}/etc/log4js.json
-WORKDIR ${INSROOT}/${APPUSER}
-RUN npm install --only=production && chown -R ${APPUSER}:${APPUSER} ${INSROOT}/${APPUSER} && npm remove -g npm
+ENV APPDIR ${INSROOT}/${APPUSER}
+
+RUN mkdir -p ${APPDIR}/lib \
+ && mkdir -p ${APPDIR}/etc \
+ && mkdir -p ${APPDIR}/log \
+ && useradd -d ${APPDIR} ${APPUSER}
+
+COPY *.js ${APPDIR}/
+COPY *.json ${APPDIR}/
+COPY *.txt ${APPDIR}/
+COPY *.yaml ${APPDIR}/
+COPY ./lib/ ${APPDIR}/lib/
+COPY ./etc/ ${APPDIR}/etc/
+
+WORKDIR ${APPDIR}
+
+RUN npm install --only=production \
+ && chown -R ${APPUSER}:${APPUSER} ${APPDIR} \
+ && npm remove -g npm \
+ && ls -laR -Inode_modules
+
USER ${APPUSER}
-VOLUME ${INSROOT}/${APPUSER}/log
+VOLUME ${APPDIR}/log
EXPOSE 8443
+
ENTRYPOINT ["/usr/local/bin/node", "deployment-handler.js"]