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

Update docker image user, update jest #103

Merged
merged 2 commits into from
Mar 7, 2024
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
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
Loading