From 8edbb4f8f65b3926989f61efe05eac5d99dd531c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 3 Nov 2017 11:18:35 -0400 Subject: [PATCH] update Dockerfile as per #6010 and #6008 --- Dockerfile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7229e6be25..adce1f33ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,20 @@ -# The base image is the latest 4.x node (LTS) on jessie (debian) -# -onbuild will install the node dependencies found in the project package.json -# and copy its content in /usr/src/app, its WORKDIR -FROM node:4-onbuild +# The base image is the latest 8.x node (LTS) +FROM node:8.9.0 + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +ARG NODE_ENV +ENV NODE_ENV $NODE_ENV +COPY package.default.json /usr/src/app/package.json +RUN npm install && npm cache clean --force +COPY . /usr/src/app ENV NODE_ENV=production \ daemon=false \ silent=false -# nodebb setup will ask you for connection information to a redis (default), mongodb then run the forum -# nodebb upgrade is not included and might be desired -CMD node app --setup && npm start +CMD ./nodebb start # the default port for NodeBB is exposed outside the container -EXPOSE 4567 +EXPOSE 4567 \ No newline at end of file