Skip to content

Commit

Permalink
feat(mojaloop/#2092): upgrade nodeJS version for core services (#243)
Browse files Browse the repository at this point in the history
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
mdebarros authored Jul 12, 2022
1 parent f203633 commit bd054c6
Show file tree
Hide file tree
Showing 35 changed files with 17,734 additions and 2,678 deletions.
674 changes: 590 additions & 84 deletions .circleci/config.yml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ jspm_packages

#package-lock.json
.history

# https://devspace.sh/
devspace*
.devspace/**.*

# Add ignores
*IGNORE*
*ignore*
4 changes: 0 additions & 4 deletions .ncurc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .ncurc.yaml
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: [
]
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.15.0
31 changes: 21 additions & 10 deletions Dockerfile
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"]
110 changes: 110 additions & 0 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,116 @@
"1771|@mojaloop/event-sdk>grpc>@mapbox/node-pre-gyp>tar": {
"decision": "fix",
"madeAt": 1629131334564
},
"1075703|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657618658482,
"expiresAt": 1660210653749
},
"1075703|@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657618658482,
"expiresAt": 1660210653749
},
"1075704|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657618659390,
"expiresAt": 1660210653749
},
"1075704|@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657618659390,
"expiresAt": 1660210653749
},
"1081008|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment": {
"decision": "ignore",
"madeAt": 1657618660308,
"expiresAt": 1660210653749
},
"1081008|@mojaloop/event-sdk>grpc>protobufjs>moment": {
"decision": "ignore",
"madeAt": 1657618660308,
"expiresAt": 1660210653749
},
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it": {
"decision": "ignore",
"madeAt": 1657618661244,
"expiresAt": 1660210653749
},
"1070030|shins>markdown-it": {
"decision": "ignore",
"madeAt": 1657618661244,
"expiresAt": 1660210653749
},
"1068310|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1657618662196,
"expiresAt": 1660210653749
},
"1081346|ansi-regex": {
"decision": "ignore",
"madeAt": 1657618663219,
"expiresAt": 1660210653749
},
"1081348|ansi-regex": {
"decision": "ignore",
"madeAt": 1657618664212,
"expiresAt": 1660210653749
},
"1070412|ejs": {
"decision": "ignore",
"madeAt": 1657618665228,
"expiresAt": 1660210653749
},
"1067536|json-pointer": {
"decision": "ignore",
"madeAt": 1657618666220,
"expiresAt": 1660210653749
},
"1070415|nth-check": {
"decision": "ignore",
"madeAt": 1657618667177,
"expiresAt": 1660210653749
},
"1068155|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657618668134,
"expiresAt": 1660210653749
},
"1070260|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657618676339,
"expiresAt": 1660210653749
},
"1067553|swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1657618677795,
"expiresAt": 1660210653749
},
"1067946|swagger2openapi>better-ajv-errors>jsonpointer>oas-validator>ajv": {
"decision": "ignore",
"madeAt": 1657618678828,
"expiresAt": 1660210653749
},
"1067332|urijs": {
"decision": "ignore",
"madeAt": 1657618679895,
"expiresAt": 1660210653749
},
"1067384|urijs": {
"decision": "ignore",
"madeAt": 1657618681685,
"expiresAt": 1660210653749
},
"1069987|urijs": {
"decision": "ignore",
"madeAt": 1657618682760,
"expiresAt": 1660210653749
},
"1070008|urijs": {
"decision": "ignore",
"madeAt": 1657618683894,
"expiresAt": 1660210653749
}
},
"rules": {},
Expand Down
Loading

0 comments on commit bd054c6

Please sign in to comment.