Skip to content

Commit

Permalink
fix(dockerfile): do not expose src to production
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Mar 12, 2024
1 parent 56d4119 commit 409b1f4
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ USER node
ARG APP_HOME=/home/node/srv
WORKDIR $APP_HOME

COPY package.json package.json
COPY package-lock.json package-lock.json

RUN npm ci

COPY --chown=node:node . .

RUN npm ci
RUN npm run build


Expand All @@ -25,15 +21,10 @@ USER node
ARG APP_HOME=/home/node/srv
WORKDIR $APP_HOME

COPY package.json package.json
COPY package-lock.json package-lock.json

COPY --chown=node:node . $APP_HOME
COPY --chown=node:node filter_ownership.aql filter_role_association.aql $APP_HOME
COPY --chown=node:node ./cfg $APP_HOME/cfg
COPY --chown=node:node --from=build $APP_HOME/lib $APP_HOME/lib

EXPOSE 50051

USER root
USER node

CMD [ "npm", "start" ]
CMD [ "node", "./lib/start.cjs" ]

0 comments on commit 409b1f4

Please sign in to comment.