Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Update Node to 20.9.0 LTS and bugfix npm eacces error
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ho <jujaga@gmail.com>
  • Loading branch information
jujaga committed Dec 12, 2023
1 parent ed8ed35 commit bf02275
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions openshift/app.bc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,25 @@ objects:
type: Git
dockerfile: |-
FROM BuildConfig
ENV NO_UPDATE_NOTIFIER=true
WORKDIR /opt/app-root/src
COPY . .
RUN npm ci
EXPOSE 3000
CMD ["npm", "run", "start"]
ARG APP_ROOT=/opt/app-root/src
ENV APP_PORT=3000 \
NO_UPDATE_NOTIFIER=true
WORKDIR ${APP_ROOT}
# NPM Permission Fix
RUN mkdir -p /.npm
RUN chown -R 1001:0 /.npm
# Install Application
COPY . ${APP_ROOT}
RUN chown -R 1001:0 ${APP_ROOT}
USER 1001
WORKDIR ${APP_ROOT}/app
RUN npm ci --omit=dev
EXPOSE ${APP_PORT}
CMD ["node", "./bin/www"]
strategy:
dockerStrategy:
env:
Expand All @@ -58,7 +71,7 @@ objects:
value: notice
from:
kind: DockerImage
name: docker.io/node:16.15.0-alpine
name: docker.io/node:20.9.0-alpine
type: Docker
successfulBuildsHistoryLimit: 3
parameters:
Expand Down

0 comments on commit bf02275

Please sign in to comment.