Skip to content

Commit

Permalink
Update docker image user, update jest
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Mar 6, 2024
1 parent d804bf9 commit 552e043
Show file tree
Hide file tree
Showing 4 changed files with 938 additions and 945 deletions.
12 changes: 6 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ module.exports = {

// A set of global variables that need to be available in all test environments
// globals: {},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
Expand Down Expand Up @@ -181,7 +176,12 @@ module.exports = {

// A map from regular expressions to paths to transformers
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(ts|tsx)?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json'
}
],
'^.+\\.(js|jsx)$': 'babel-jest',
},

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/node-fetch": "2.6.2",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"babel-jest": "^27.4.6",
"babel-jest": "^29.7.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-header": "^3.1.1",
Expand All @@ -23,13 +23,13 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-sort-destructure-keys": "^1.4.0",
"husky": "^7.0.4",
"jest": "^27.4.7",
"jest": "^29.7.0",
"lint-staged": "^12.3.3",
"node-fetch": "2.6.7",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"regenerator-runtime": "^0.13.9",
"ts-jest": "^27.1.3",
"ts-jest": "^29.1.2",
"ts-loader": "^9.2.6",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.12.0",
Expand Down
18 changes: 13 additions & 5 deletions packages/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@ FROM node:18-alpine
COPY --from=builder /app/packages/node/app.tgz /app.tgz

# Install production dependencies
RUN apk add --no-cache tini curl git && \
tar -xzvf /app.tgz --strip 1 && \
rm /app.tgz && \
yarn install --production && \
RUN apk add --no-cache tini curl git && \
apk add --no-cache python3 make g++ && \
npm install -g node-gyp

# Install the app
RUN npm i -g app.tgz

# Clean up unused deps
RUN rm /app.tgz && \
yarn cache clean && \
rm -rf /root/.npm /root/.cache

# Make the user not ROOT
USER 1000

# Set Entry point and command
ENTRYPOINT ["/sbin/tini", "--", "bin/run"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/lib/node_modules/@subql/node-algorand/bin/run"]
CMD ["-f","/app"]
Loading

0 comments on commit 552e043

Please sign in to comment.