-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: upgrade ci, image, packages, audit (#145)
* feat!: upgrade ci, image, packages, audit * chore: ci * chore: ignore * chore: nvm ncu * chore: ci * chore: remove internal libs * chore: changes * chore: alias * chore: linting * chore: ci * chore(snapshot): 13.0.0-snapshot.0 * chore: dockerfile * chore: move test/, package.json out of src * chore: move more files out of /src * chore: fix structure * chore: readme * chore: ci * chore: ci * chore(snapshot): 13.0.0-snapshot.1 * chore: comp * chore(snapshot): 13.0.0-snapshot.2 * chore(snapshot): 13.0.0-snapshot.3 * chore: address comments
- Loading branch information
Showing
62 changed files
with
24,698 additions
and
15,296 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,32 @@ | ||
const config = { | ||
env: { | ||
es2020: true, | ||
node: true, | ||
'jest/globals': true, | ||
}, | ||
plugins: ['ava', 'jest'], | ||
extends: 'eslint:recommended', | ||
rules: { | ||
indent: [ | ||
'error', | ||
4, | ||
{ SwitchCase: 1 }, | ||
], | ||
'linebreak-style': [ | ||
2, | ||
'unix', | ||
], | ||
quotes: [ | ||
2, | ||
'single', | ||
], | ||
semi: [ | ||
2, | ||
'always', | ||
], | ||
'no-console': 2, | ||
'no-prototype-builtins': 'off', | ||
} | ||
}; | ||
|
||
module.exports = config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"reject": [ | ||
"eslint", | ||
"node-fetch" | ||
"node-fetch", | ||
"ava" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -17,3 +17,4 @@ exclude: | |
- '**/coverage/**' | ||
- '**/.eslintrc.js' | ||
- '**/jest.integration.config.js' | ||
- '**/init/**' |
File renamed without changes.
File renamed without changes.
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,31 @@ | ||
FROM node:12.16.0-alpine as intermediate | ||
FROM node:16.15.0-alpine as builder | ||
USER root | ||
|
||
WORKDIR /src/ | ||
COPY ./src/ /src/ | ||
RUN npm install --production | ||
WORKDIR /opt/app/ | ||
|
||
FROM node:12.16.0-alpine | ||
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 | ||
|
||
WORKDIR /src/ | ||
COPY package.json package-lock.json* /opt/app/ | ||
RUN npm ci | ||
|
||
COPY --from=intermediate /src/ /src/ | ||
COPY --from=intermediate /src/package.json /src/package.json | ||
COPY src /opt/app/src | ||
|
||
EXPOSE 3000 3001 3003 | ||
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 | ||
|
||
CMD node /src/index.js | ||
COPY --chown=app-user --from=builder /opt/app/ . | ||
RUN npm prune --production | ||
|
||
EXPOSE 3000 3001 3003 | ||
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.