mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
be72c5109a
This script creates a directory `backend/package` which only contains the files required by the backend at runtime: - The contents of `dist` - `node_modules` minus `typescript` and `@typescript-eslint`. These packages are build-only and are larger than the remaining whole package. By using only `backend/package` in the Docker image, the backend content size in the image is decreased by 70% to 31M. This, along with the improved copying in the Dockerfile, reduces the backend image size by 44% to 200M. (Step `RUN chown -R 1000:1000 /backend ...` created a layer that effectively duplicated the backend.)
69 lines
2.3 KiB
JSON
69 lines
2.3 KiB
JSON
{
|
|
"name": "mempool-backend",
|
|
"version": "2.5.0-dev",
|
|
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
|
|
"license": "GNU Affero General Public License v3.0",
|
|
"homepage": "https://mempool.space",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/mempool/mempool"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/mempool/mempool/issues"
|
|
},
|
|
"keywords": [
|
|
"bitcoin",
|
|
"mempool",
|
|
"blockchain",
|
|
"explorer",
|
|
"liquid",
|
|
"lightning"
|
|
],
|
|
"main": "index.ts",
|
|
"scripts": {
|
|
"tsc": "./node_modules/typescript/bin/tsc -p tsconfig.build.json",
|
|
"build": "npm run tsc && npm run create-resources",
|
|
"create-resources": "cp ./src/tasks/price-feeds/mtgox-weekly.json ./dist/tasks && node dist/api/fetch-version.js",
|
|
"package": "npm run build && rm -rf package && mv dist package && mv node_modules package && npm run package-rm-build-deps",
|
|
"package-rm-build-deps": "(cd package/node_modules; rm -r typescript @typescript-eslint)",
|
|
"start": "node --max-old-space-size=2048 dist/index.js",
|
|
"start-production": "node --max-old-space-size=4096 dist/index.js",
|
|
"test": "./node_modules/.bin/jest --coverage",
|
|
"lint": "./node_modules/.bin/eslint . --ext .ts",
|
|
"lint:fix": "./node_modules/.bin/eslint . --ext .ts --fix",
|
|
"prettier": "./node_modules/.bin/prettier --write \"src/**/*.{js,ts}\""
|
|
},
|
|
"dependencies": {
|
|
"@babel/core": "^7.18.6",
|
|
"@mempool/electrum-client": "^1.1.7",
|
|
"@types/node": "^16.11.41",
|
|
"axios": "~0.27.2",
|
|
"bitcoinjs-lib": "6.0.2",
|
|
"crypto-js": "^4.0.0",
|
|
"express": "^4.18.0",
|
|
"maxmind": "^4.3.6",
|
|
"mysql2": "2.3.3",
|
|
"node-worker-threads-pool": "^1.5.1",
|
|
"socks-proxy-agent": "~7.0.0",
|
|
"typescript": "~4.7.4",
|
|
"ws": "~8.8.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.18.6",
|
|
"@babel/code-frame": "^7.18.6",
|
|
"@types/compression": "^1.7.2",
|
|
"@types/crypto-js": "^4.1.1",
|
|
"@types/express": "^4.17.13",
|
|
"@types/jest": "^28.1.4",
|
|
"@types/ws": "~8.5.3",
|
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
"@typescript-eslint/parser": "^5.30.5",
|
|
"eslint": "^8.19.0",
|
|
"eslint-config-prettier": "^8.5.0",
|
|
"jest": "^28.1.2",
|
|
"prettier": "^2.7.1",
|
|
"ts-jest": "^28.0.5",
|
|
"ts-node": "^10.8.2"
|
|
}
|
|
}
|