diff --git a/Dockerfile b/Dockerfile index ac47aec..8c9f0a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,24 @@ FROM node:11.14.0-stretch -COPY . /home/app +ARG UID=1000 +ARG GID=1000 -WORKDIR /home/app +ENV APP_HOME=/home/app +# Create group "app" and user "app". +RUN useradd --system --create-home --home ${APP_HOME} --shell /sbin/nologin --no-log-init app + +WORKDIR $APP_HOME +USER app + +COPY --chown=app:app package.json package-lock.json $APP_HOME/ + +# Install dependencies RUN npm i +# Copy the main application. +COPY --chown=app:app . $APP_HOME + +EXPOSE 8081 + CMD ["npm","run","start"] diff --git a/config/config.json b/config/config.json index 0fe0680..b41e959 100644 --- a/config/config.json +++ b/config/config.json @@ -3,7 +3,7 @@ "config_id": "development", "app_name": "Nodelogic", "app_desc": "Node JS Applogic for Rubykube Stack", - "node_port": 3001, + "node_port": 8081, "json_indentation": 4, "barong_url": "http://localhost:3000/api/v2/management/users/get", "jwt": {