Skip to content

Commit

Permalink
Improve Dockerfile and change the default port
Browse files Browse the repository at this point in the history
  • Loading branch information
alinetskyi committed Jul 29, 2019
1 parent 6e8f77a commit c4ab1cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit c4ab1cf

Please sign in to comment.