Skip to content

Conversation

@tataihono
Copy link
Contributor

@tataihono tataihono commented Jan 27, 2026

Changes

  • Added Vite configuration for CMS admin with optimized chunk splitting
  • Added compression middleware to Strapi config
  • Added hls.js version override in package.json
  • Replaced vite.config.example.ts with vite.config.ts

Files Changed

  • apps/cms/config/middlewares.ts - Added compression middleware
  • apps/cms/src/admin/vite.config.ts - New Vite config with manual chunk splitting
  • apps/cms/src/admin/vite.config.example.ts - Removed (replaced by vite.config.ts)
  • package.json - Added hls.js override
  • pnpm-lock.yaml - Updated dependencies

Refs: AI-8

Summary by CodeRabbit

  • New Features

    • Enabled response compression in the CMS to reduce payload sizes and improve load times.
  • Refactor

    • Reworked CMS Docker build with a multi-stage image and non-root runtime for leaner, more reliable deployments.
  • Chores

    • Updated CI/CD workflows: added timeouts, enabled concurrency, and switched Docker build actions.
    • Added .dockerignore to reduce build context size.
    • Introduced .npmrc to improve workspace package handling.
    • Added dependency override for hls.js to ensure consistent builds.
  • Style

    • Removed a redundant comment in an admin build config.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add Vite configuration with optimized chunk splitting for CMS admin
- Add compression middleware to Strapi config
- Add hls.js version override in package.json
- Replace vite.config.example.ts with vite.config.ts

Refs: AI-8
@linear
Copy link

linear bot commented Jan 27, 2026

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

This PR introduces compression middleware for the CMS, upgrades the Docker base image from Alpine to Debian with updated system dependencies and restructured build stages, replaces Docker Actions with useblacksmith alternatives across multiple CI/CD workflows, adds concurrency controls to prevent workflow conflicts, configures hls.js dependency override, and enables npm workspace package injection.

Changes

Cohort / File(s) Summary
CMS Middleware & Configuration
apps/cms/config/middlewares.ts, apps/cms/src/admin/vite.config.ts
Added strapi::compression middleware to the exported array; removed explanatory comment from Vite config
Dependency & Package Configuration
package.json, .npmrc
Added hls.js version override in pnpm.overrides; enabled npm workspace package injection via inject-workspace-packages=true
Container Setup
apps/cms/Dockerfile
Changed base image from node:22-alpine to node:22-bookworm-slim; migrated system dependencies from apk to apt-get (libglib2.0-0, libexpat1, ca-certificates, libcairo2, libpango-1.0-0, libjpeg62-turbo, libgif7, librsvg2-2); restructured build stages with dedicated build and runtime stages; changed working directory from /opt to /app; moved CMS deploy and build steps into build stage; adjusted startup command from pnpm run start to npm run start
Docker Build Context
.dockerignore
Added node\_modules exclusion patterns to reduce Docker build context
CI/CD Docker Actions Migration
.github/workflows/api-deploy-worker.yml, .github/workflows/api-gateway-prod-worker.yml, .github/workflows/api-gateway-stage-worker.yml, .github/workflows/ecs-frontend-deploy-prod-worker.yml, .github/workflows/ecs-frontend-deploy-stage-worker.yml
Replaced docker/setup-buildx-action@v3 with useblacksmith/setup-docker-builder@v1; replaced docker/build-push-action@v6 with useblacksmith/build-push-action@v2; added timeout-minutes: 20 to jobs; ecs-frontend workflows added conditional target selection logic based on inputs.name
CI/CD Concurrency Controls
.github/workflows/autofix.ci.yml, .github/workflows/codeql-analysis.yml, .github/workflows/danger.yml, .github/workflows/e2e-tests.yml, .github/workflows/housekeeping-cron.yml, .github/workflows/housekeeping-label-feature-pr.yml
Added concurrency blocks with group based on workflow name and head\_ref/run\_id to cancel in-progress runs

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • kiran-redhat
  • sharon-elsa-mathew1995
  • mikeallisonJS
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes Dockerfile refactoring, GitHub workflow updates (Blacksmith actions, concurrency), .dockerignore, and .npmrc which are not mentioned in AI-8. Remove or justify Dockerfile, workflow, .dockerignore, and .npmrc changes; or link them to a separate issue describing infrastructure improvements.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions 'add vite config and compression middleware' but the PR also changes Dockerfiles, GitHub workflows, and adds .dockerignore/.npmrc files.
Linked Issues check ✅ Passed Changes include Vite config (vite.config.ts), compression middleware (middlewares.ts), and hls.js override (package.json) as required by AI-8.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ai8-8-add-vite-config-and-compression

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • AI8-8: Entity not found: Issue - Could not find referenced Issue.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Jan 27, 2026

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 2340db5

Command Status Duration Result
nx run journeys-admin-e2e:e2e ❌ Failed 2m 1s View ↗
nx run watch-e2e:e2e ✅ Succeeded 27s View ↗
nx run videos-admin-e2e:e2e ✅ Succeeded 6s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 27s View ↗
nx run watch-modern-e2e:e2e ✅ Succeeded 5s View ↗
nx run resources-e2e:e2e ✅ Succeeded 15s View ↗
nx run short-links-e2e:e2e ✅ Succeeded 3s View ↗
nx run player-e2e:e2e ✅ Succeeded 4s View ↗
Additional runs (28) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-01-27 20:09:32 UTC

@github-actions github-actions bot requested a deployment to Preview - resources January 27, 2026 02:18 Pending
@github-actions github-actions bot temporarily deployed to Preview - journeys January 27, 2026 02:18 Inactive
@github-actions github-actions bot temporarily deployed to Preview - short-links January 27, 2026 02:18 Inactive
@github-actions github-actions bot requested a deployment to Preview - journeys-admin January 27, 2026 02:18 Pending
@github-actions github-actions bot temporarily deployed to Preview - watch-modern January 27, 2026 02:18 Inactive
@github-actions github-actions bot requested a deployment to Preview - videos-admin January 27, 2026 02:18 Pending
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch-modern ✅ Ready watch-modern preview Wed Jan 28 09:02:23 NZDT 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
docs ✅ Ready docs preview Wed Jan 28 09:02:39 NZDT 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Wed Jan 28 09:02:33 NZDT 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Wed Jan 28 09:02:53 NZDT 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Wed Jan 28 09:03:07 NZDT 2026

@github-actions github-actions bot temporarily deployed to Preview - short-links January 27, 2026 02:23 Inactive
@github-actions github-actions bot temporarily deployed to Preview - videos-admin January 27, 2026 02:23 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources January 27, 2026 02:23 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys January 27, 2026 02:23 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys-admin January 27, 2026 02:23 Inactive
@github-actions github-actions bot temporarily deployed to Preview - watch-modern January 27, 2026 02:23 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Wed Jan 28 09:03:10 NZDT 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Wed Jan 28 09:03:34 NZDT 2026

@github-actions github-actions bot temporarily deployed to Preview - videos-admin January 27, 2026 11:15 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys January 27, 2026 11:15 Inactive
@github-actions github-actions bot temporarily deployed to Preview - short-links January 27, 2026 11:15 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources January 27, 2026 11:15 Inactive
@github-actions github-actions bot temporarily deployed to Preview - watch-modern January 27, 2026 11:15 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys-admin January 27, 2026 11:15 Inactive
- Eliminated the manual chunk splitting logic for vendor libraries in the Vite configuration to simplify the build process.
@github-actions github-actions bot temporarily deployed to Preview - short-links January 27, 2026 11:37 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys January 27, 2026 11:37 Inactive
@github-actions github-actions bot temporarily deployed to Preview - watch-modern January 27, 2026 11:37 Inactive
@github-actions github-actions bot temporarily deployed to Preview - videos-admin January 27, 2026 11:37 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys-admin January 27, 2026 11:37 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources January 27, 2026 11:37 Inactive
- Eliminated concurrency configurations from production and staging deployment workflows to simplify the setup.
@github-actions github-actions bot temporarily deployed to Preview - videos-admin January 27, 2026 20:00 Inactive
@github-actions github-actions bot temporarily deployed to Preview - watch-modern January 27, 2026 20:00 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources January 27, 2026 20:00 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys-admin January 27, 2026 20:00 Inactive
@github-actions github-actions bot temporarily deployed to Preview - short-links January 27, 2026 20:00 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys January 27, 2026 20:00 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/cms/Dockerfile`:
- Around line 31-36: The build fails because pnpm deploy --prod excludes
devDependencies, but strapi build (triggered by RUN ["npm", "run", "build"])
needs TypeScript to parse vite.config.ts. In the Dockerfile section containing
pnpm deploy --prod --filter cms ./apps/cms/deploy and WORKDIR
/app/apps/cms/deploy, remove the --prod flag from the pnpm deploy command so
TypeScript is included, or move typescript from devDependencies to dependencies
in the cms package to ensure it’s present during the Docker build.

Comment on lines +31 to +36
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
pnpm deploy --prod --filter cms ./apps/cms/deploy

RUN chown -R node:node /opt/apps/cms
USER node
WORKDIR /app/apps/cms/deploy

RUN ["npm", "run", "build"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check package.json in apps/cms for dependency placement

echo "=== Finding package.json files ==="
find apps/cms -maxdepth 2 -name "package.json" -type f

echo ""
echo "=== Content of apps/cms/package.json ==="
if [ -f "apps/cms/package.json" ]; then
  cat apps/cms/package.json | jq '.' | head -100
fi

Repository: JesusFilm/core

Length of output: 1145


🏁 Script executed:

#!/bin/bash
# Check if vite.config.ts exists and examine full Dockerfile

echo "=== Searching for vite.config.ts ==="
find apps/cms -name "vite.config.ts" -o -name "vite.config.js"

echo ""
echo "=== Full Dockerfile content ==="
cat apps/cms/Dockerfile

echo ""
echo "=== Checking if strapi build requires vite ==="
grep -r "vite" apps/cms --include="*.json" --include="*.ts" --include="*.js" || echo "No vite references found"

Repository: JesusFilm/core

Length of output: 1365


Move typescript to dependencies or remove --prod flag from pnpm deploy.

The pnpm deploy --prod command excludes devDependencies, but strapi build needs TypeScript to parse vite.config.ts. Since TypeScript is currently in devDependencies only, the build will fail in the Docker container. Either move typescript to dependencies or use pnpm deploy --filter cms ./apps/cms/deploy without the --prod flag.

🤖 Prompt for AI Agents
In `@apps/cms/Dockerfile` around lines 31 - 36, The build fails because pnpm
deploy --prod excludes devDependencies, but strapi build (triggered by RUN
["npm", "run", "build"]) needs TypeScript to parse vite.config.ts. In the
Dockerfile section containing pnpm deploy --prod --filter cms ./apps/cms/deploy
and WORKDIR /app/apps/cms/deploy, remove the --prod flag from the pnpm deploy
command so TypeScript is included, or move typescript from devDependencies to
dependencies in the cms package to ensure it’s present during the Docker build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants