Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to node LTS v16 #302

Merged
merged 9 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
511 changes: 385 additions & 126 deletions .circleci/config.yml

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions .ncurc.json

This file was deleted.

5 changes: 5 additions & 0 deletions .ncurc.yaml
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"
]
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.15.0
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
FROM node:12.16.1-alpine as builder
gibaros marked this conversation as resolved.
Show resolved Hide resolved
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"]
50 changes: 50 additions & 0 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,56 @@
"decision": "ignore",
"madeAt": 1646392187792,
"expiresAt": 1648984175470
},
"1070449|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1654706006773,
"expiresAt": 1657297987895
},
"1070449|@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1654706006773,
"expiresAt": 1657297987895
},
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>widdershins>markdown-it": {
"decision": "ignore",
"madeAt": 1654706022493,
"expiresAt": 1657297987895
},
"1070030|shins>markdown-it": {
"decision": "ignore",
"madeAt": 1654706022493,
"expiresAt": 1657297987895
},
"1068310|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>widdershins>markdown-it>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1654706029847,
"expiresAt": 1657297987895
},
"1070412|ejs": {
"decision": "ignore",
"madeAt": 1654706033457,
"expiresAt": 1657297987895
},
"1068155|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1654706037747,
"expiresAt": 1657297987895
},
"1070260|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1654706041235,
"expiresAt": 1657297987895
},
"1067553|swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1654706044130,
"expiresAt": 1657297987895
},
"1067946|swagger2openapi>better-ajv-errors>jsonpointer>oas-validator>ajv": {
"decision": "ignore",
"madeAt": 1654706048509,
"expiresAt": 1657297987895
}
},
"rules": {},
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
ports:
- "3001:3001"
volumes:
- ./docker/central-ledger/default.json:/opt/central-ledger/config/default.json
- ./docker/central-ledger/default.json:/opt/app/config/default.json
environment:
- CLEDG_DATABASE_URI=mysql://central_ledger:password@mysql:3306/central_ledger
- CLEDG_SIDECAR__DISABLED=true
Expand All @@ -25,7 +25,7 @@ services:
- "3000:3000"
volumes:
# override the default values with our own - this is because the KAFKA_HOST env variable is ignored for some reason
- ./docker/ml-api-adapter/default.json:/opt/ml-api-adapter/config/default.json
- ./docker/ml-api-adapter/default.json:/opt/app/config/default.json

# TODO: we should be able to remove this - I think the image command is broken
command:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ services:
environment:
- CSL_LOG_TRANSPORT=file
volumes:
- ./docker/quoting-service/default.json:/opt/quoting-service/config/default.json
- ./docker/quoting-service/default.json:/opt/app/config/default.json
Loading