-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(mojaloop/#3461): nodejs upgrade (#8)
* chore(mojaloop/#3461): nodejs upgrade * fix broken ci step job reference * add missing steps for npm packages * trigger ci pipeline * update deps * update deps * add EOF lines * update deps * Update package.json Co-authored-by: Steven Oderayi <oderayi@gmail.com> * chore: dep update --------- Co-authored-by: Steven Oderayi <oderayi@gmail.com>
- Loading branch information
1 parent
cf84222
commit 8a46fd6
Showing
8 changed files
with
4,685 additions
and
3,220 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.15.0 | ||
18.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"types": [ | ||
{"type": "feat", "section": "Features"}, | ||
{"type": "fix", "section": "Bug Fixes"}, | ||
{"type": "docs", "section": "Documentation"}, | ||
{"type": "style", "section": "Styling"}, | ||
{"type": "refactor", "section": "Refactors"}, | ||
{"type": "perf", "section": "Performance"}, | ||
{"type": "test", "section": "Tests"}, | ||
{"type": "build", "section": "Build System"}, | ||
{"type": "ci", "section": "CI"}, | ||
{"type": "chore", "section": "Chore"}, | ||
{"type": "revert", "section": "Reverts"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,47 @@ | ||
FROM node:16.15.0-alpine as builder | ||
# Arguments | ||
ARG NODE_VERSION=lts-alpine | ||
|
||
# NOTE: Ensure you set NODE_VERSION Build Argument as follows... | ||
# | ||
# export NODE_VERSION="$(cat .nvmrc)-alpine" \ | ||
# docker build \ | ||
# --build-arg NODE_VERSION=$NODE_VERSION \ | ||
# -t mojaloop/sdk-scheme-adapter:local \ | ||
# . \ | ||
# | ||
|
||
# Build Image | ||
FROM node:${NODE_VERSION} as builder | ||
USER root | ||
|
||
WORKDIR /opt/app | ||
|
||
RUN apk add --no-cache -t build-dependencies make gcc g++ python3 libtool libressl-dev openssl-dev autoconf automake \ | ||
&& cd $(npm root -g)/npm \ | ||
&& npm config set unsafe-perm true \ | ||
&& npm install -g node-gyp | ||
RUN apk --no-cache add git | ||
RUN apk add --no-cache -t build-dependencies make gcc g++ python3 libtool openssl-dev autoconf automake bash \ | ||
&& cd $(npm root -g)/npm | ||
|
||
COPY package.json package-lock.json* /opt/app/ | ||
|
||
RUN npm install | ||
RUN npm ci | ||
|
||
RUN apk del build-dependencies | ||
|
||
COPY src /opt/app/src | ||
|
||
FROM node:16.15.0-alpine | ||
WORKDIR /opt/app | ||
FROM node:${NODE_VERSION} | ||
|
||
# Create a non-root user: ml-user | ||
RUN adduser -D ml-user | ||
WORKDIR /opt/app | ||
|
||
COPY --chown=ml-user --from=builder /opt/app . | ||
RUN chown ml-user:ml-user /opt/app | ||
# Create empty log file & link stdout to the application log file | ||
RUN mkdir ./logs && touch ./logs/combined.log | ||
# Links combined to stdout | ||
RUN ln -sf /dev/stdout ./logs/combined.log | ||
|
||
USER ml-user | ||
# Create a non-root user:app-user | ||
RUN adduser -D app-user | ||
USER app-user | ||
|
||
COPY --chown=app-user --from=builder /opt/app . | ||
RUN npm prune --production | ||
|
||
CMD ["npm", "run", "cli"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.