-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mojaloop/#2092): upgrade nodeJS version for core services (#243)
feat(mojaloop/[#2092](https://github.com/mdebarros/simulators/issues/2092)): upgrade nodeJS version for core services - mojaloop/project#2092 - standardised CI scripts - updated docker-compose files to work correctly - fixed lint issues - updated .nvmrc to latest LTS version - added standard CI scripts/config to package.json: release, snapshot, standard-version, etc - updated gitignore to include test/results and IGNORE patterns - updated README with standard auto-release information - Fixed imports - Cleaned up Package.json Notes: - Helm chart mountPaths need to be updated from `/opt/simulator` to `/opt/app` as follows: ```YAML volumeMounts: - mountPath: /opt/app/config name: <deployment-name> ``` BREAKING CHANGE: Major version bump for node v16 LTS support, re-structuring of project directories to align to core Mojaloop repositories and docker image now uses `/opt/app` instead of `/opt/simulator` which will impact config mounts.
- Loading branch information
Showing
35 changed files
with
17,734 additions
and
2,678 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
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Add a TODO comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc). | ||
reject: [ | ||
] |
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 @@ | ||
16.15.0 |
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,16 +1,27 @@ | ||
FROM node:12.16.0-alpine | ||
WORKDIR /opt/simulator | ||
FROM node:16.15.0-alpine as builder | ||
WORKDIR /opt/app | ||
|
||
RUN apk --no-cache add --virtual native-deps \ | ||
g++ gcc libgcc libstdc++ linux-headers make python bash | ||
RUN apk --no-cache add git | ||
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 | ||
|
||
COPY package*.json /opt/simulator/ | ||
COPY package*.json /opt/app/ | ||
|
||
RUN npm install --quiet node-gyp -g &&\ | ||
npm install --quiet --production | ||
RUN apk del native-deps | ||
RUN npm ci | ||
|
||
COPY src /opt/simulator/src | ||
FROM node:16.15.0-alpine | ||
WORKDIR /opt/app | ||
|
||
# Create a non-root user: ml-user | ||
RUN adduser -D ml-user | ||
USER ml-user | ||
|
||
COPY --chown=ml-user --from=builder /opt/app . | ||
RUN npm prune --production | ||
|
||
COPY src /opt/app/src | ||
|
||
EXPOSE 8444 | ||
CMD ["node", "./src/index.js"] | ||
CMD ["npm", "run", "start"] |
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.