diff --git a/.nvmrc b/.nvmrc index 7b3bc8194e..53d1c14db3 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.13 +v22 diff --git a/.vscode/launch.json b/.vscode/launch.json index 67d1affa86..9f4cda608a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -453,6 +453,7 @@ "sourceMaps": true, "cwd": "${workspaceRoot}/services/github/pod-github", "protocol": "inspector", + "attachSimplePort": 0, "outputCapture": "std" }, { diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index b3e9213002..96cbd258b9 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -25,7 +25,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ isVariableSetInNpmrcFile: () => (/* binding */ isVariableSetInNpmrcFile), -/* harmony export */ syncNpmrc: () => (/* binding */ syncNpmrc) +/* harmony export */ syncNpmrc: () => (/* binding */ syncNpmrc), +/* harmony export */ trimNpmrcFileLines: () => (/* binding */ trimNpmrcFileLines) /* harmony export */ }); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); @@ -46,7 +47,7 @@ __webpack_require__.r(__webpack_exports__); // create a global _combinedNpmrc for cache purpose const _combinedNpmrcMap = new Map(); function _trimNpmrcFile(options) { - const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; + const { sourceNpmrcPath, linesToPrepend, linesToAppend, supportEnvVarFallbackSyntax } = options; const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); if (combinedNpmrcFromCache !== undefined) { return combinedNpmrcFromCache; @@ -62,6 +63,21 @@ function _trimNpmrcFile(options) { npmrcFileLines.push(...linesToAppend); } npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); + const resultLines = trimNpmrcFileLines(npmrcFileLines, process.env, supportEnvVarFallbackSyntax); + const combinedNpmrc = resultLines.join('\n'); + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + return combinedNpmrc; +} +/** + * + * @param npmrcFileLines The npmrc file's lines + * @param env The environment variables object + * @param supportEnvVarFallbackSyntax Whether to support fallback values in the form of `${VAR_NAME:-fallback}` + * @returns + */ +function trimNpmrcFileLines(npmrcFileLines, env, supportEnvVarFallbackSyntax) { + var _a; const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" const expansionRegExp = /\$\{([^\}]+)\}/g; @@ -80,10 +96,35 @@ function _trimNpmrcFile(options) { const environmentVariables = line.match(expansionRegExp); if (environmentVariables) { for (const token of environmentVariables) { - // Remove the leading "${" and the trailing "}" from the token - const environmentVariableName = token.substring(2, token.length - 1); - // Is the environment variable defined? - if (!process.env[environmentVariableName]) { + /** + * Remove the leading "${" and the trailing "}" from the token + * + * ${nameString} -> nameString + * ${nameString-fallbackString} -> name-fallbackString + * ${nameString:-fallbackString} -> name:-fallbackString + */ + const nameWithFallback = token.substring(2, token.length - 1); + let environmentVariableName; + let fallback; + if (supportEnvVarFallbackSyntax) { + /** + * Get the environment variable name and fallback value. + * + * name fallback + * nameString -> nameString undefined + * nameString-fallbackString -> nameString fallbackString + * nameString:-fallbackString -> nameString fallbackString + */ + const matched = nameWithFallback.match(/^([^:-]+)(?:\:?-(.+))?$/); + // matched: [originStr, variableName, fallback] + environmentVariableName = (_a = matched === null || matched === void 0 ? void 0 : matched[1]) !== null && _a !== void 0 ? _a : nameWithFallback; + fallback = matched === null || matched === void 0 ? void 0 : matched[2]; + } + else { + environmentVariableName = nameWithFallback; + } + // Is the environment variable and fallback value defined. + if (!env[environmentVariableName] && !fallback) { // No, so trim this line lineShouldBeTrimmed = true; break; @@ -100,20 +141,13 @@ function _trimNpmrcFile(options) { resultLines.push(line); } } - const combinedNpmrc = resultLines.join('\n'); - //save the cache - _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); - return combinedNpmrc; + return resultLines; } function _copyAndTrimNpmrcFile(options) { - const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; + const { logger, sourceNpmrcPath, targetNpmrcPath } = options; logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose logger.info(` --> "${targetNpmrcPath}"`); - const combinedNpmrc = _trimNpmrcFile({ - sourceNpmrcPath, - linesToPrepend, - linesToAppend - }); + const combinedNpmrc = _trimNpmrcFile(options); fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); return combinedNpmrc; } @@ -123,7 +157,7 @@ function syncNpmrc(options) { info: console.log, // eslint-disable-next-line no-console error: console.error - }, createIfMissing = false, linesToAppend, linesToPrepend } = options; + }, createIfMissing = false } = options; const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { @@ -132,13 +166,9 @@ function syncNpmrc(options) { if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) { fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true }); } - return _copyAndTrimNpmrcFile({ - sourceNpmrcPath, + return _copyAndTrimNpmrcFile(Object.assign({ sourceNpmrcPath, targetNpmrcPath, - logger, - linesToAppend, - linesToPrepend - }); + logger }, options)); } else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target @@ -150,13 +180,13 @@ function syncNpmrc(options) { throw new Error(`Error syncing .npmrc file: ${e}`); } } -function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { +function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey, supportEnvVarFallbackSyntax) { const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`; //if .npmrc file does not exist, return false directly if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { return false; } - const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath }); + const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath, supportEnvVarFallbackSyntax }); const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); return trimmedNpmrcFile.match(variableKeyRegExp) !== null; } @@ -440,7 +470,8 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ sourceNpmrcFolder, targetNpmrcFolder: rushTempFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); const npmPath = getNpmPath(); // This returns something that looks like: @@ -656,7 +687,8 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ sourceNpmrcFolder, targetNpmrcFolder: packageInstallFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); _createPackageJson(packageInstallFolder, packageName, packageVersion); const command = lockFilePath ? 'ci' : 'install'; diff --git a/dev/base-image/rekoni.Dockerfile b/dev/base-image/rekoni.Dockerfile index 72ac676bb1..f317c85ab6 100644 --- a/dev/base-image/rekoni.Dockerfile +++ b/dev/base-image/rekoni.Dockerfile @@ -6,4 +6,4 @@ RUN apt-get install -y \ poppler-utils \ html2text \ unrtf -RUN npm install --ignore-scripts=false --verbose sharp@v0.30.2 pdfjs-dist@v2.12.313 --unsafe-perm \ No newline at end of file +RUN npm install --ignore-scripts=false --verbose sharp@v0.32.6 pdfjs-dist@v2.12.313 --unsafe-perm \ No newline at end of file diff --git a/dev/import-tool/Dockerfile b/dev/import-tool/Dockerfile index 8bf3db5802..170f27b9a5 100644 --- a/dev/import-tool/Dockerfile +++ b/dev/import-tool/Dockerfile @@ -1,5 +1,4 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app COPY bundle/bundle.js ./ diff --git a/dev/tool/Dockerfile b/dev/tool/Dockerfile index e5d2e79894..c222852188 100644 --- a/dev/tool/Dockerfile +++ b/dev/tool/Dockerfile @@ -1,9 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy msgpackr msgpackr-extract --unsafe-perm - COPY bundle/bundle.js ./ CMD [ "bash" ] diff --git a/pods/account/Dockerfile b/pods/account/Dockerfile index 270607dfb8..f3a4f33939 100644 --- a/pods/account/Dockerfile +++ b/pods/account/Dockerfile @@ -1,16 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 3000 diff --git a/pods/backup/Dockerfile b/pods/backup/Dockerfile index 1bcbcc317c..6084db0e97 100644 --- a/pods/backup/Dockerfile +++ b/pods/backup/Dockerfile @@ -1,17 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ COPY bundle/model.json ./ diff --git a/pods/collaborator/Dockerfile b/pods/collaborator/Dockerfile index 59f6041e61..bd024ac80b 100644 --- a/pods/collaborator/Dockerfile +++ b/pods/collaborator/Dockerfile @@ -1,15 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ diff --git a/pods/front/Dockerfile b/pods/front/Dockerfile index d1dfeb5e71..a43d062c0b 100644 --- a/pods/front/Dockerfile +++ b/pods/front/Dockerfile @@ -1,16 +1,5 @@ -FROM node:20 - -ENV NODE_ENV production - +FROM hardcoreeng/front-base:v20250113a WORKDIR /app -RUN npm install --ignore-scripts=false --verbose sharp@v0.32.6 bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ diff --git a/pods/fulltext/Dockerfile b/pods/fulltext/Dockerfile index ad9de1b47a..576e8c8af0 100644 --- a/pods/fulltext/Dockerfile +++ b/pods/fulltext/Dockerfile @@ -1,17 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ COPY bundle/model.json ./ diff --git a/pods/server/Dockerfile b/pods/server/Dockerfile index 251577680c..6e1db09fbc 100644 --- a/pods/server/Dockerfile +++ b/pods/server/Dockerfile @@ -1,14 +1,5 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy msgpackr msgpackr-extract --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/model.json ./ COPY bundle/bundle.js ./ diff --git a/pods/stats/Dockerfile b/pods/stats/Dockerfile index c7f44e76cf..c0ffe5678e 100644 --- a/pods/stats/Dockerfile +++ b/pods/stats/Dockerfile @@ -1,14 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 4900 diff --git a/pods/workspace/Dockerfile b/pods/workspace/Dockerfile index 85a3276463..7cf9522934 100644 --- a/pods/workspace/Dockerfile +++ b/pods/workspace/Dockerfile @@ -1,16 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ diff --git a/products/tracker/.browserslistrc b/products/tracker/.browserslistrc deleted file mode 100644 index e94f8140cc..0000000000 --- a/products/tracker/.browserslistrc +++ /dev/null @@ -1 +0,0 @@ -defaults diff --git a/products/tracker/.env b/products/tracker/.env deleted file mode 100644 index 968e3c9034..0000000000 --- a/products/tracker/.env +++ /dev/null @@ -1,5 +0,0 @@ -GMAIL_URL=http://localhost:8087 -TELEGRAM_URL=http://localhost:8086 -FRONT_URL=http://localhost:8080 - -REKONI_URL=http://localhost:4004 diff --git a/products/tracker/.env-prod b/products/tracker/.env-prod deleted file mode 100644 index aaab7d0c27..0000000000 --- a/products/tracker/.env-prod +++ /dev/null @@ -1,4 +0,0 @@ - -TELEGRAM_URL = https://telegram.hc.engineering -REKONI_URL = https://rekoni.hc.engineering -GMAIL_URL = https://gmail.hc.engineering \ No newline at end of file diff --git a/products/tracker/.gitignore b/products/tracker/.gitignore deleted file mode 100644 index d1948308bb..0000000000 --- a/products/tracker/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -stats.json -dist/ - diff --git a/products/tracker/Dockerfile b/products/tracker/Dockerfile deleted file mode 100644 index 45a5ea4b57..0000000000 --- a/products/tracker/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM node:20 - -WORKDIR /usr/src/app - -COPY bundle/bundle.js ./ -COPY dist/ ./dist/ - -EXPOSE 8080 -CMD [ "node", "bundle.js" ] diff --git a/products/tracker/config.json b/products/tracker/config.json deleted file mode 100644 index 9a68daead4..0000000000 --- a/products/tracker/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ACCOUNTS_URL":"http://localhost:3000", - "UPLOAD_URL":"/files", - "REKONI_URL": "http://localhost:4004" -} \ No newline at end of file diff --git a/products/tracker/package.json b/products/tracker/package.json deleted file mode 100644 index deffb27298..0000000000 --- a/products/tracker/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "name": "@hcengineering/prod-tracker", - "version": "1.0.0", - "license": "EPL-2.0", - "scripts": { - "build": "echo 'disabled'", - "*build": "rm -rf ./dist && cross-env NODE_ENV=production webpack --stats-error-details && echo 'done'", - "*bundle": "cp -r ../../server/front/bundle.js .", - "bundle": "echo 'disabled'", - "*docker:build": "docker build -t hardcoreeng/tracker-front .", - "*docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tracker-front staging", - "*docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tracker-front", - "analyze": "cross-env NODE_ENV=production webpack --json > stats.json", - "show": "webpack-bundle-analyzer stats.json dist", - "dev-server": "cross-env CLIENT_TYPE=dev-server webpack serve", - "start": "cross-env NODE_ENV=production webpack serve", - "format": "echo 'Not required'", - "lint": "echo 'Not required'", - "lint:fix": "echo 'Not required'", - "*deploy": "cp -p public/* dist && aws s3 sync dist s3://anticrm-platform --delete --acl public-read" - }, - "devDependencies": { - "cross-env": "~7.0.3", - "webpack-cli": "^4.6.0", - "webpack": "^5.32.0", - "mini-css-extract-plugin": "^2.2.0", - "dotenv-webpack": "^7.0.2", - "ts-loader": "^9.2.5", - "svelte-loader": "^3.1.9", - "css-loader": "^5.2.1", - "webpack-dev-server": "^4.7.4", - "style-loader": "^3.2.1", - "file-loader": "^6.2.0", - "sass-loader": "^12.1.0", - "@types/node": "~20.11.16", - "webpack-bundle-analyzer": "^4.4.1", - "svgo-loader": "^3.0.0", - "autoprefixer": "^10.2.6", - "postcss": "^8.3.4", - "postcss-loader": "^6.1.0", - "postcss-load-config": "^3.1.0", - "compression-webpack-plugin": "~9.0.0", - "html-webpack-plugin": "~5.5.0" - }, - "dependencies": { - "@hcengineering/platform": "^0.6.8", - "@hcengineering/ui": "^0.6.3", - "@hcengineering/theme": "^0.6.2", - "svelte": "^4.2.5", - "@hcengineering/login": "^0.6.1", - "@hcengineering/login-assets": "^0.6.0", - "@hcengineering/login-resources": "^0.6.2", - "@hcengineering/client": "^0.6.6", - "@hcengineering/workbench": "^0.6.2", - "@hcengineering/workbench-resources": "^0.6.1", - "@hcengineering/view": "^0.6.2", - "@hcengineering/view-assets": "^0.6.0", - "@hcengineering/view-resources": "^0.6.0", - "@hcengineering/contact": "^0.6.11", - "@hcengineering/contact-resources": "^0.6.0", - "@hcengineering/task": "^0.6.1", - "@hcengineering/task-assets": "^0.6.0", - "@hcengineering/task-resources": "^0.6.0", - "@hcengineering/chunter": "^0.6.2", - "@hcengineering/chunter-assets": "^0.6.0", - "@hcengineering/chunter-resources": "^0.6.0", - "@hcengineering/setting": "^0.6.2", - "@hcengineering/setting-assets": "^0.6.0", - "@hcengineering/setting-resources": "^0.6.0", - "@hcengineering/client-resources": "^0.6.4", - "@hcengineering/contact-assets": "^0.6.0", - "@hcengineering/activity": "^0.6.0", - "@hcengineering/activity-assets": "^0.6.0", - "@hcengineering/activity-resources": "^0.6.1", - "@hcengineering/telegram": "^0.6.2", - "@hcengineering/telegram-assets": "^0.6.0", - "@hcengineering/telegram-resources": "^0.6.0", - "@hcengineering/workbench-assets": "^0.6.0", - "@hcengineering/attachment": "^0.6.1", - "@hcengineering/attachment-assets": "^0.6.0", - "@hcengineering/attachment-resources": "^0.6.0", - "@hcengineering/gmail": "^0.6.0", - "@hcengineering/gmail-assets": "^0.6.0", - "@hcengineering/gmail-resources": "^0.6.0", - "@hcengineering/image-cropper": "^0.6.0", - "@hcengineering/image-cropper-resources": "^0.6.0", - "@hcengineering/server-attachment": "^0.6.1", - "@hcengineering/server-attachment-resources": "^0.6.0", - "@hcengineering/server-collaboration": "^0.6.0", - "@hcengineering/server-collaboration-resources": "^0.6.0", - "@hcengineering/server-contact": "^0.6.1", - "@hcengineering/server-contact-resources": "^0.6.0", - "@hcengineering/server-notification": "^0.6.0", - "@hcengineering/server-notification-resources": "^0.6.0", - "@hcengineering/server-setting": "^0.6.0", - "@hcengineering/server-setting-resources": "^0.6.0", - "@hcengineering/templates": "^0.6.0", - "@hcengineering/templates-assets": "^0.6.0", - "@hcengineering/templates-resources": "^0.6.0", - "@hcengineering/notification": "^0.6.5", - "@hcengineering/notification-assets": "^0.6.0", - "@hcengineering/notification-resources": "^0.6.0", - "@hcengineering/preference": "^0.6.2", - "@hcengineering/preference-assets": "^0.6.0", - "@hcengineering/calendar": "^0.6.2", - "@hcengineering/calendar-assets": "^0.6.0", - "@hcengineering/calendar-resources": "^0.6.0", - "@hcengineering/core": "^0.6.21", - "@hcengineering/server-chunter": "^0.6.0", - "@hcengineering/server-chunter-resources": "^0.6.0", - "@hcengineering/server-task": "^0.6.0", - "@hcengineering/server-task-resources": "^0.6.0", - "@hcengineering/server-tracker": "^0.6.0", - "@hcengineering/server-tracker-resources": "^0.6.0", - "@hcengineering/server-calendar": "^0.6.0", - "@hcengineering/server-calendar-resources": "^0.6.0", - "@hcengineering/server-gmail": "^0.6.0", - "@hcengineering/server-gmail-resources": "^0.6.0", - "@hcengineering/server-telegram": "^0.6.0", - "@hcengineering/server-telegram-resources": "^0.6.0", - "@hcengineering/presentation": "^0.6.2", - "@hcengineering/tracker": "^0.6.1", - "@hcengineering/tracker-assets": "^0.6.0", - "@hcengineering/tracker-resources": "^0.6.0", - "@hcengineering/prod": "^1.0.1", - "@hcengineering/text-editor-resources": "^0.6.0", - "@hcengineering/devmodel": "^0.6.0", - "@hcengineering/devmodel-resources": "^0.6.0", - "@hcengineering/front": "^0.6.0", - "svelte-loader": "^3.1.9" - } -} diff --git a/products/tracker/postcss.config.js b/products/tracker/postcss.config.js deleted file mode 100644 index 88752c6cb0..0000000000 --- a/products/tracker/postcss.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: [ - require('autoprefixer') - ] -} diff --git a/products/tracker/public/config.json b/products/tracker/public/config.json deleted file mode 100644 index fe8def8763..0000000000 --- a/products/tracker/public/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ACCOUNTS_URL":"/account", - "UPLOAD_URL":"/files", - "MODEL_VERSION": null -} \ No newline at end of file diff --git a/products/tracker/public/favicon.ico b/products/tracker/public/favicon.ico deleted file mode 100644 index ec62fb52d4..0000000000 Binary files a/products/tracker/public/favicon.ico and /dev/null differ diff --git a/products/tracker/public/favicon.png b/products/tracker/public/favicon.png deleted file mode 100644 index 6631310e17..0000000000 Binary files a/products/tracker/public/favicon.png and /dev/null differ diff --git a/products/tracker/public/favicon.svg b/products/tracker/public/favicon.svg deleted file mode 100644 index ef13b59405..0000000000 --- a/products/tracker/public/favicon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/products/tracker/public/favicon_16.png b/products/tracker/public/favicon_16.png deleted file mode 100644 index d6cc4d5e3c..0000000000 Binary files a/products/tracker/public/favicon_16.png and /dev/null differ diff --git a/products/tracker/public/favicon_192.png b/products/tracker/public/favicon_192.png deleted file mode 100644 index 6df544a12d..0000000000 Binary files a/products/tracker/public/favicon_192.png and /dev/null differ diff --git a/products/tracker/public/favicon_32.png b/products/tracker/public/favicon_32.png deleted file mode 100644 index aa783f18df..0000000000 Binary files a/products/tracker/public/favicon_32.png and /dev/null differ diff --git a/products/tracker/src/index.ejs b/products/tracker/src/index.ejs deleted file mode 100644 index 2d4d4719f2..0000000000 --- a/products/tracker/src/index.ejs +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - Tracker - - - - - - - - - - - - \ No newline at end of file diff --git a/products/tracker/src/main-dev.ts b/products/tracker/src/main-dev.ts deleted file mode 100644 index e7e2557331..0000000000 --- a/products/tracker/src/main-dev.ts +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering, Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { createApp } from '@hcengineering/ui' -import { configurePlatform } from './platform' -import { configurePlatformDev, configurePlatformDevServer } from './platform-dev' - -configurePlatform().then(() => { - if (process.env.CLIENT_TYPE === 'dev') { - configurePlatformDev() - } - if (process.env.CLIENT_TYPE === 'dev-server' || process.env.CLIENT_TYPE === 'dev-production') { - configurePlatformDevServer() - } - - createApp(document.body) -}) - diff --git a/products/tracker/src/main.ts b/products/tracker/src/main.ts deleted file mode 100644 index ea4d431004..0000000000 --- a/products/tracker/src/main.ts +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering, Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { createApp } from '@hcengineering/ui' -import { configurePlatform } from './platform' - -configurePlatform().then(() => { - createApp(document.body) -}) diff --git a/products/tracker/src/platform-dev.ts b/products/tracker/src/platform-dev.ts deleted file mode 100644 index 6fdfd3202a..0000000000 --- a/products/tracker/src/platform-dev.ts +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright © 2020 Anticrm Platform Contributors. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { addLocation } from '@hcengineering/platform' -import login from '@hcengineering/login' -import { setMetadata } from '@hcengineering/platform' -import devmodel, { devModelId } from '@hcengineering/devmodel' -import client from '@hcengineering/client' - -export function configurePlatformDevServer() { - // Set devmodel to hook client to be able to present all activity - enableDevModel() -} - -function enableDevModel() { - setMetadata(client.metadata.ClientHook, devmodel.hook.Hook) - addLocation(devModelId, () => import(/* webpackChunkName: "devmodel" */ '@hcengineering/devmodel-resources')) -} diff --git a/products/tracker/src/platform.ts b/products/tracker/src/platform.ts deleted file mode 100644 index 6c17bdb7e8..0000000000 --- a/products/tracker/src/platform.ts +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright © 2020 Anticrm Platform Contributors. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { addLocation } from '@hcengineering/platform' - -import login, { loginId } from '@hcengineering/login' -import workbench, { workbenchId } from '@hcengineering/workbench' -import uiPlugin from '@hcengineering/ui' -import { viewId } from '@hcengineering/view' -import { taskId } from '@hcengineering/task' -import contact, { contactId } from '@hcengineering/contact' -import { chunterId } from '@hcengineering/chunter' -import { activityId } from '@hcengineering/activity' -import { settingId } from '@hcengineering/setting' -import telegram, { telegramId } from '@hcengineering/telegram' -import { attachmentId } from '@hcengineering/attachment' -import client, { clientId } from '@hcengineering/client' -import gmail, { gmailId } from '@hcengineering/gmail' -import { imageCropperId } from '@hcengineering/image-cropper' -import { templatesId } from '@hcengineering/templates' -import { notificationId } from '@hcengineering/notification' -import { calendarId } from '@hcengineering/calendar' -import { trackerId } from '@hcengineering/tracker' - -import '@hcengineering/login-assets' -import '@hcengineering/task-assets' -import '@hcengineering/view-assets' -import '@hcengineering/chunter-assets' -import '@hcengineering/attachment-assets' -import '@hcengineering/contact-assets' -import '@hcengineering/activity-assets' -import '@hcengineering/setting-assets' -import '@hcengineering/telegram-assets' -import '@hcengineering/gmail-assets' -import '@hcengineering/workbench-assets' -import '@hcengineering/templates-assets' -import '@hcengineering/notification-assets' -import '@hcengineering/preference-assets' -import '@hcengineering/tracker-assets' -import presentation, { presentationId } from '@hcengineering/presentation' -import { coreId } from '@hcengineering/core' -import { textEditorId } from '@hcengineering/text-editor' - -import { setMetadata } from '@hcengineering/platform' - -export async function configurePlatform() { - const config = await (await fetch('/config.json')).json() - console.log('loading configuration', config) - setMetadata(login.metadata.AccountsUrl, config.ACCOUNTS_URL) - - if (config.MODEL_VERSION != null) { - console.log('Minimal Model version requirement', config.MODEL_VERSION) - setMetadata(presentation.metadata.RequiredVersion, config.MODEL_VERSION) - } - setMetadata(telegram.metadata.TelegramURL, process.env.TELEGRAM_URL ?? 'http://localhost:8086') - setMetadata(telegram.metadata.BotUrl, process.TELEGRAM_BOT_URL ?? 'http://localhost:4020') - setMetadata(gmail.metadata.GmailURL, process.env.GMAIL_URL ?? 'http://localhost:8087') - - setMetadata(uiPlugin.metadata.DefaultApplication, workbench.component.WorkbenchApp) - setMetadata(workbench.metadata.ExcludedApplications, [contact.app.Contacts]) - - setMetadata( - uiPlugin.metadata.Routes, - new Map([ - [workbenchId, workbench.component.WorkbenchApp], - [loginId, login.component.LoginApp] - ]) - ) - - addLocation(coreId, async () => ({ default: async () => ({}) })) - addLocation(presentationId, async () => ({ default: async () => ({}) })) - - addLocation(clientId, () => import(/* webpackChunkName: "client" */ '@hcengineering/client-resources')) - addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@hcengineering/login-resources')) - addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@hcengineering/workbench-resources')) - addLocation(viewId, () => import(/* webpackChunkName: "view" */ '@hcengineering/view-resources')) - addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@hcengineering/task-resources')) - addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@hcengineering/contact-resources')) - addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@hcengineering/chunter-resources')) - addLocation(activityId, () => import(/*webpackChunkName: "activity" */ '@hcengineering/activity-resources')) - addLocation(settingId, () => import(/* webpackChunkName: "setting" */ '@hcengineering/setting-resources')) - addLocation(telegramId, () => import(/* webpackChunkName: "telegram" */ '@hcengineering/telegram-resources')) - addLocation(attachmentId, () => import(/* webpackChunkName: "attachment" */ '@hcengineering/attachment-resources')) - addLocation(gmailId, () => import(/* webpackChunkName: "gmail" */ '@hcengineering/gmail-resources')) - addLocation(imageCropperId, () => import(/* webpackChunkName: "image-cropper" */ '@hcengineering/image-cropper-resources')) - addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@hcengineering/templates-resources')) - addLocation(notificationId, () => import(/* webpackChunkName: "notification" */ '@hcengineering/notification-resources')) - addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@hcengineering/calendar-resources')) - - addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@hcengineering/tracker-resources')) - addLocation(textEditorId, () => import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources')) - setMetadata(uiPlugin.metadata.PlatformTitle, 'Tracker') - setMetadata(workbench.metadata.PlatformTitle, 'Tracker') - - setMetadata(client.metadata.FilterModel, 'ui') -} diff --git a/products/tracker/tsconfig.json b/products/tracker/tsconfig.json deleted file mode 100644 index 287187ed58..0000000000 --- a/products/tracker/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./dist/", - "module": "esnext", - "target": "es2016", - "allowJs": true, - "sourceMap": true, - "moduleResolution": "node", - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "lib": [ - "es2016", - "dom" - ] - } -} \ No newline at end of file diff --git a/products/tracker/webpack.config.js b/products/tracker/webpack.config.js deleted file mode 100644 index 3dcef28278..0000000000 --- a/products/tracker/webpack.config.js +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright © 2020 Anticrm Platform Contributors. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONSe OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -const path = require('path') -const prodModule = require('@hcengineering/prod/webpack.config') - -module.exports = { - ...prodModule, - output: { - path: __dirname + '/dist', - filename: '[name].[contenthash].js', - chunkFilename: '[name].[contenthash].js', - publicPath: '/' - }, - devServer: { - ...prodModule.devServer, - static: { - directory: path.resolve(__dirname, "public"), - publicPath: "/", - serveIndex: true, - watch: true, - } - } -} diff --git a/rush.json b/rush.json index c0f405aa5a..14700680ff 100644 --- a/rush.json +++ b/rush.json @@ -16,7 +16,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.140.1", + "rushVersion": "5.148.0", /** * The next field selects which package manager should be installed and determines its version. @@ -26,7 +26,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "8.15.9", + "pnpmVersion": "9.15.3", // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4", diff --git a/server/collaborator/Dockerfile b/server/collaborator/Dockerfile index ce84366d90..eb575413aa 100644 --- a/server/collaborator/Dockerfile +++ b/server/collaborator/Dockerfile @@ -1,15 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 3078 diff --git a/services/ai-bot/love-agent/Dockerfile b/services/ai-bot/love-agent/Dockerfile index 3d411a7456..be1c48777d 100644 --- a/services/ai-bot/love-agent/Dockerfile +++ b/services/ai-bot/love-agent/Dockerfile @@ -1,14 +1,5 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true RUN npm install -g pnpm diff --git a/services/ai-bot/pod-ai-bot/Dockerfile b/services/ai-bot/pod-ai-bot/Dockerfile index 940ae9d120..74c4c01013 100644 --- a/services/ai-bot/pod-ai-bot/Dockerfile +++ b/services/ai-bot/pod-ai-bot/Dockerfile @@ -1,14 +1,5 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ COPY assets/avatar.png ./ diff --git a/services/analytics-collector/pod-analytics-collector/Dockerfile b/services/analytics-collector/pod-analytics-collector/Dockerfile index b73b6397be..9361956982 100644 --- a/services/analytics-collector/pod-analytics-collector/Dockerfile +++ b/services/analytics-collector/pod-analytics-collector/Dockerfile @@ -1,14 +1,5 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ diff --git a/services/calendar/pod-calendar/Dockerfile b/services/calendar/pod-calendar/Dockerfile index ec117e9290..0aa462644a 100644 --- a/services/calendar/pod-calendar/Dockerfile +++ b/services/calendar/pod-calendar/Dockerfile @@ -1,15 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 8095 diff --git a/services/github/pod-github/Dockerfile b/services/github/pod-github/Dockerfile index 5f7feb3e06..bd024ac80b 100644 --- a/services/github/pod-github/Dockerfile +++ b/services/github/pod-github/Dockerfile @@ -1,17 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ COPY bundle/bundle.js.map ./ diff --git a/services/gmail/pod-gmail/Dockerfile b/services/gmail/pod-gmail/Dockerfile index af5b114a12..5661f66285 100644 --- a/services/gmail/pod-gmail/Dockerfile +++ b/services/gmail/pod-gmail/Dockerfile @@ -1,15 +1,6 @@ - -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 8087 diff --git a/services/love/Dockerfile b/services/love/Dockerfile index e51e7cdb07..ba6d9d0385 100644 --- a/services/love/Dockerfile +++ b/services/love/Dockerfile @@ -1,15 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ diff --git a/services/print/pod-print/Dockerfile b/services/print/pod-print/Dockerfile index 74410baa1c..47adea67a1 100644 --- a/services/print/pod-print/Dockerfile +++ b/services/print/pod-print/Dockerfile @@ -1,22 +1,6 @@ -FROM node:20 - -# We don't need the standalone Chromium -ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true -# Set executable path for puppeteer -ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium - -# Install Chromium and fonts -# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md?plain=1#L397 -RUN apt-get update && \ - apt-get install -y gnupg wget dumb-init && \ - apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 && \ - apt-get install -y chromium-common/stable chromium/stable --no-install-recommends && \ - apt-get clean - +FROM hardcoreeng/print-base:v20250113a WORKDIR /usr/src/app - -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm COPY bundle/bundle.js ./ CMD [ "dumb-init", "node", "bundle.js" ] diff --git a/services/rekoni/Dockerfile b/services/rekoni/Dockerfile index 566f2ff925..92821195bf 100644 --- a/services/rekoni/Dockerfile +++ b/services/rekoni/Dockerfile @@ -1,22 +1,5 @@ -FROM node:20 AS runtime - -RUN apt-get update -RUN apt-get install -y \ - coreutils \ - antiword \ - poppler-utils \ - html2text \ - unrtf -ENV NODE_ENV=production +FROM hardcoreeng/rekoni-base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose sharp@v0.30.2 pdfjs-dist@v2.12.313 --unsafe-perm - -RUN apt-get update -RUN apt-get install -y libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true COPY bundle/bundle.js ./ EXPOSE 4004 diff --git a/services/ses/pod-ses/Dockerfile b/services/ses/pod-ses/Dockerfile index 2eacceee23..59d4d23843 100644 --- a/services/ses/pod-ses/Dockerfile +++ b/services/ses/pod-ses/Dockerfile @@ -1,15 +1,5 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - -COPY bundle/bundle.js ./ - EXPOSE 8089 CMD [ "node", "bundle.js" ] diff --git a/services/sign/pod-sign/Dockerfile b/services/sign/pod-sign/Dockerfile index 091f896325..f4e4906394 100644 --- a/services/sign/pod-sign/Dockerfile +++ b/services/sign/pod-sign/Dockerfile @@ -1,18 +1,7 @@ -FROM node:20 - -RUN apt-get update && apt-get install dumb-init +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm - -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ CMD [ "dumb-init", "node", "bundle.js" ] diff --git a/services/telegram-bot/pod-telegram-bot/Dockerfile b/services/telegram-bot/pod-telegram-bot/Dockerfile index b2f46d3ead..5c2487bd93 100644 --- a/services/telegram-bot/pod-telegram-bot/Dockerfile +++ b/services/telegram-bot/pod-telegram-bot/Dockerfile @@ -1,14 +1,6 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 4020 diff --git a/services/telegram/pod-telegram/Dockerfile b/services/telegram/pod-telegram/Dockerfile index 644892d120..5d23846041 100644 --- a/services/telegram/pod-telegram/Dockerfile +++ b/services/telegram/pod-telegram/Dockerfile @@ -1,15 +1,7 @@ -FROM node:20 - +FROM hardcoreeng/base:v20250113a WORKDIR /usr/src/app -RUN apt-get update -RUN apt-get install libjemalloc2 -RUN apt-get clean - -ENV LD_PRELOAD=libjemalloc.so.2 -ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true - COPY bundle/bundle.js ./ EXPOSE 8086