From 91540224a92fe520acb88216f675b0b8121dbc65 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Wed, 9 Sep 2026 15:48:19 +0200 Subject: [PATCH] Lighten Strapi CMS: drop unused cloud plugin, disable telemetry/promo UI Remove @strapi/plugin-cloud (deploy is self-hosted via Docker/Ansible, never Strapi Cloud), disable the admin NPS/Enterprise-promotion flags (single-admin panel, no upsell needed), disable Strapi's anonymous telemetry, and prune dev dependencies from the production Docker image layer. --- cms/.env.example | 1 + cms/Dockerfile | 1 + cms/config/admin.ts | 4 ++-- cms/package-lock.json | 24 ------------------------ cms/package.json | 1 - docker-compose.yml | 1 + 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/cms/.env.example b/cms/.env.example index 78c956e..8fe7881 100644 --- a/cms/.env.example +++ b/cms/.env.example @@ -6,3 +6,4 @@ ADMIN_JWT_SECRET=tobemodified TRANSFER_TOKEN_SALT=tobemodified JWT_SECRET=tobemodified ENCRYPTION_KEY=tobemodified +STRAPI_TELEMETRY_DISABLED=true diff --git a/cms/Dockerfile b/cms/Dockerfile index a75512b..33970a6 100644 --- a/cms/Dockerfile +++ b/cms/Dockerfile @@ -6,6 +6,7 @@ COPY package*.json ./ RUN npm ci COPY . . RUN npm run build +RUN npm prune --omit=dev FROM node:22-alpine AS runtime WORKDIR /app diff --git a/cms/config/admin.ts b/cms/config/admin.ts index 161ebce..9e166ee 100644 --- a/cms/config/admin.ts +++ b/cms/config/admin.ts @@ -16,8 +16,8 @@ const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Admin => encryptionKey: env('ENCRYPTION_KEY')!, }, flags: { - nps: env.bool('FLAG_NPS', true), - promoteEE: env.bool('FLAG_PROMOTE_EE', true), + nps: env.bool('FLAG_NPS', false), + promoteEE: env.bool('FLAG_PROMOTE_EE', false), docLinks: env.bool('FLAG_DOC_LINKS', true), }, }); diff --git a/cms/package-lock.json b/cms/package-lock.json index 702e428..03c91f1 100644 --- a/cms/package-lock.json +++ b/cms/package-lock.json @@ -9,7 +9,6 @@ "version": "0.1.0", "dependencies": { "@strapi/database": "5.52.1", - "@strapi/plugin-cloud": "5.52.1", "@strapi/plugin-users-permissions": "5.52.1", "@strapi/strapi": "5.52.1", "pg": "8.20.0", @@ -7684,29 +7683,6 @@ "npm": ">=6.0.0" } }, - "node_modules/@strapi/plugin-cloud": { - "version": "5.52.1", - "resolved": "https://registry.npmjs.org/@strapi/plugin-cloud/-/plugin-cloud-5.52.1.tgz", - "integrity": "sha512-l5AZ03hhU4cz3ow1Cqvf8d6cJLMrDEjeHa0Jz90ObFygKVo4v3rSBL3WT++X8BZnBQRT6rGj5RrSMwTxL5bggw==", - "license": "MIT", - "dependencies": { - "@strapi/design-system": "2.2.4", - "@strapi/icons": "2.2.4", - "react-intl": "6.6.2" - }, - "engines": { - "node": ">=20.0.0 <=26.x.x", - "npm": ">=6.0.0" - }, - "peerDependencies": { - "@strapi/admin": "^5.0.0", - "@strapi/strapi": "^5.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0", - "react-router-dom": "^6.30.3", - "styled-components": "^6.0.0" - } - }, "node_modules/@strapi/plugin-users-permissions": { "version": "5.52.1", "resolved": "https://registry.npmjs.org/@strapi/plugin-users-permissions/-/plugin-users-permissions-5.52.1.tgz", diff --git a/cms/package.json b/cms/package.json index 0664510..5d69520 100644 --- a/cms/package.json +++ b/cms/package.json @@ -16,7 +16,6 @@ }, "dependencies": { "@strapi/database": "5.52.1", - "@strapi/plugin-cloud": "5.52.1", "@strapi/plugin-users-permissions": "5.52.1", "@strapi/strapi": "5.52.1", "pg": "8.20.0", diff --git a/docker-compose.yml b/docker-compose.yml index c93a93d..c408751 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,7 @@ services: TRANSFER_TOKEN_SALT: ${TRANSFER_TOKEN_SALT} JWT_SECRET: ${JWT_SECRET} ENCRYPTION_KEY: ${ENCRYPTION_KEY} + STRAPI_TELEMETRY_DISABLED: "true" volumes: - cms-uploads:/app/public/uploads