-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade to node LTS v16 (#302)
feat(mojaloop/#2767): upgrade nodeJS version for quoting-service - mojaloop/project#2767 standardised CI scripts, however, the test-integration CI job needed minor tweaks to work with the quoting-service's implementation updated docker-compose files to work correctly added wait-4-docker npm script 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 Removed unnecessary dependencies Removed unnecessary files Notes: Helm chart mountPaths need to be updated from /opt/quoting-service to /opt/app as follows: 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/quoting-service which will impact config mounts.
- Loading branch information
Showing
12 changed files
with
21,381 additions
and
7,390 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 @@ | ||
## 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: [ | ||
"json-rules-engine", | ||
"eslint" | ||
] |
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,36 +1,38 @@ | ||
FROM node:12.16.1-alpine as builder | ||
FROM node:16.15.0-alpine as builder | ||
USER root | ||
|
||
WORKDIR /opt/quoting-service | ||
WORKDIR /opt/app | ||
|
||
RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \ | ||
RUN 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 package-lock.json* /opt/quoting-service/ | ||
COPY package.json package-lock.json* /opt/app/ | ||
|
||
RUN npm install | ||
RUN npm ci | ||
|
||
RUN apk del build-dependencies | ||
|
||
COPY config /opt/quoting-service/config | ||
COPY src /opt/quoting-service/src | ||
COPY src /opt/app/src | ||
COPY config /opt/app/config | ||
|
||
FROM node:12.16.1-alpine | ||
FROM node:16.15.0-alpine | ||
|
||
WORKDIR /opt/quoting-service | ||
WORKDIR /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 | ||
|
||
# Create a non-root user: ml-user | ||
RUN adduser -D ml-user | ||
USER ml-user | ||
# Create a non-root user:app-user | ||
RUN adduser -D app-user | ||
USER app-user | ||
|
||
COPY --chown=ml-user --from=builder /opt/quoting-service . | ||
COPY --chown=app-user --from=builder /opt/app . | ||
RUN npm prune --production | ||
|
||
EXPOSE 3002 | ||
CMD ["npm", "run", "start"] | ||
CMD ["npm", "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
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.