Skip to content

Commit

Permalink
feat!: upgrade node to lts, ci, image, packages, audit (#90)
Browse files Browse the repository at this point in the history
* feat!: upgrade node, ci, image, packages, audit

* chore(snapshot): 14.0.0-snapshot.0

* chore: fix ci

* chore: audit

* chore(snapshot): 14.0.0-snapshot.1

* chore: address comments

* chore: ncu

* chore: dep update
  • Loading branch information
kleyow authored Jul 13, 2022
1 parent 696f22a commit 0b14d0a
Show file tree
Hide file tree
Showing 10 changed files with 22,717 additions and 8,040 deletions.
546 changes: 376 additions & 170 deletions .circleci/config.yml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .ncurc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 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: [
# TODO: v6+ (ref: https://github.com/sindresorhus/get-port/releases/tag/v6.0.0) is an ESM library and thus not compatible with CommonJS. Future story needed to resolve.
"get-port"
]

8 changes: 0 additions & 8 deletions .ncurc.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.15.0
29 changes: 21 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
FROM node:12.16.0-alpine
FROM node:16.15.0-alpine as builder
USER root

WORKDIR /opt/transaction-requests-service
WORKDIR /opt/app/

RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \
RUN apk add --no-cache -t build-dependencies git make gcc g++ python3 libtool 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/transaction-requests-service/
RUN npm install --production
COPY package.json package-lock.json* /opt/app/
RUN npm ci

RUN apk del build-dependencies
COPY src /opt/app/src
COPY config /opt/app/config

COPY config /opt/transaction-requests-service/config
COPY src /opt/transaction-requests-service/src
FROM node:16.15.0-alpine
WORKDIR /opt/app/

# Create empty log file & link stdout to the application log file
RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log

# 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

EXPOSE 4001
CMD ["npm", "run", "start"]
95 changes: 95 additions & 0 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,101 @@
"decision": "ignore",
"madeAt": 1646395113780,
"expiresAt": 1648987098674
},
"1075703|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657653904515,
"expiresAt": 1660245901217
},
"1075703|@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657653904515,
"expiresAt": 1660245901217
},
"1075704|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657653905248,
"expiresAt": 1660245901217
},
"1075704|@mojaloop/event-sdk>grpc>protobufjs": {
"decision": "ignore",
"madeAt": 1657653905248,
"expiresAt": 1660245901217
},
"1081008|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment": {
"decision": "ignore",
"madeAt": 1657653906001,
"expiresAt": 1660245901217
},
"1081008|@mojaloop/event-sdk>grpc>protobufjs>moment": {
"decision": "ignore",
"madeAt": 1657653906001,
"expiresAt": 1660245901217
},
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it": {
"decision": "ignore",
"madeAt": 1657653906823,
"expiresAt": 1660245901217
},
"1070030|shins>markdown-it": {
"decision": "ignore",
"madeAt": 1657653906823,
"expiresAt": 1660245901217
},
"1068310|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>widdershins>markdown-it>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1657653907939,
"expiresAt": 1660245901217
},
"1070412|ejs": {
"decision": "ignore",
"madeAt": 1657653908863,
"expiresAt": 1660245901217
},
"1068155|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657653909597,
"expiresAt": 1660245901217
},
"1070260|shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657653910293,
"expiresAt": 1660245901217
},
"1067553|swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1657653911025,
"expiresAt": 1660245901217
},
"1067946|swagger2openapi>better-ajv-errors>jsonpointer>oas-validator>ajv": {
"decision": "ignore",
"madeAt": 1657653912578,
"expiresAt": 1660245901217
},
"1070030|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it": {
"decision": "ignore",
"madeAt": 1657654910713,
"expiresAt": 1660246904657
},
"1070030|widdershins>markdown-it": {
"decision": "ignore",
"madeAt": 1657654910713,
"expiresAt": 1660246904657
},
"1068155|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657654911553,
"expiresAt": 1660246904657
},
"1070260|@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>protobufjs>moment>shins>markdown-it>sanitize-html": {
"decision": "ignore",
"madeAt": 1657654912363,
"expiresAt": 1660246904657
},
"1068310|widdershins>markdown-it>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1657654913204,
"expiresAt": 1660246904657
}
},
"rules": {},
Expand Down
Loading

0 comments on commit 0b14d0a

Please sign in to comment.