Skip to content

🧑‍💻(frontend) run yarn inside a Docker instance#228

Open
qbey wants to merge 6 commits intomainfrom
qbey/-node-run-in-docker
Open

🧑‍💻(frontend) run yarn inside a Docker instance#228
qbey wants to merge 6 commits intomainfrom
qbey/-node-run-in-docker

Conversation

@qbey
Copy link
Member

@qbey qbey commented Jan 16, 2026

Purpose

Do not install node modules from local host.

Proposal

  • update makefile to run in docker instance.

Summary by CodeRabbit

  • Chores
    • Standardized frontend build and run commands to make local development and automation more consistent.
    • Streamlined install, lint, i18n extract/deploy, and development server workflows (including a dedicated 3000-port dev variant).
    • Simplified version bumping across frontend packages to reduce duplication and improve reliability.

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

elvoisin and others added 5 commits December 19, 2025 17:12
Simplified chat rendering
Pydantic AI allows setting multiple static and dynamic system prompts
to define conversation context and rules. Previously, these were sent
to the model API as separate messages, which caused compatibility
issues with some self-hosted models (e.g., Gemma3/vLLM).

This commit switches from using `system_prompt` to `instruction` as
recommended in the Pydantic AI documentation, thus merging several
instructions into a single message.

Reference: https://ai.pydantic.dev/agents/#system-prompts
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
@qbey qbey self-assigned this Jan 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Walkthrough

Makefile updated to introduce three frontend Yarn variables and refactor frontend targets to use them. Direct cd + yarn calls were replaced (with suppressed echo @), and package version bumping consolidated to use a COMPOSE_RUN-based invocation across frontend paths.

Changes

Cohort / File(s) Summary
Makefile: frontend Yarn variables & targets
Makefile
Added FRONTEND_YARN, FRONTEND_CONVERSATIONS_YARN, and FRONTEND_CONVERSATIONS_YARN_3000. Replaced direct cd and yarn invocations in frontend targets (install, lint, i18n-extract, i18n-deploy, dev) with these variables and prefixed commands with @ to suppress echo. Consolidated bump-packages-version to run yarn version via COMPOSE_RUN across frontend-related paths instead of multiple per-directory cd+yarn calls.

Sequence Diagram(s)

(omitted — changes are Makefile-driven and do not introduce a multi-component runtime control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: introducing Yarn variables to run yarn inside Docker instead of on the host machine.
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.


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.

Do not install node modules from local host.
@qbey qbey force-pushed the qbey/-node-run-in-docker branch from fcc05b0 to 8434efd Compare January 16, 2026 09:17
@qbey qbey added the noChangeLog This does not require a changelog line label Jan 16, 2026
@sonarqubecloud
Copy link

Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Makefile (1)

342-365: Update help text: “install the frontend locally” is now inaccurate.

The target now runs inside Docker, so the help string should reflect that to avoid confusion.

✏️ Suggested tweak
-frontend-development-install: ## install the frontend locally
+frontend-development-install: ## install the frontend in Docker
🤖 Fix all issues with AI agents
In `@Makefile`:
- Around line 56-58: The Makefile target vars FRONTEND_YARN,
FRONTEND_CONVERSATIONS_YARN and FRONTEND_CONVERSATIONS_YARN_3000 run yarn in the
bind-mounted node service so installs write host ./src/frontend/node_modules;
change these variables to add anonymous-volume flags to COMPOSE_RUN so
node_modules is mounted inside the container (not on host). For example, update
FRONTEND_YARN to invoke $(COMPOSE_RUN) with an extra -v
/app/src/frontend/node_modules and update FRONTEND_CONVERSATIONS_YARN and
FRONTEND_CONVERSATIONS_YARN_3000 to add -v
/app/src/frontend/apps/conversations/node_modules (and also
/app/src/frontend/node_modules if needed) so yarn writes to container volumes
rather than the host. Ensure you keep the existing -w paths and port override in
FRONTEND_CONVERSATIONS_YARN_3000.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcc05b0 and 8434efd.

📒 Files selected for processing (1)
  • Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test-e2e-chromium
  • GitHub Check: test-back
  • GitHub Check: build-and-push-frontend
  • GitHub Check: build-and-push-backend
🔇 Additional comments (1)
Makefile (1)

379-384: LGTM — consistent dockerized version bumping.

The switch to COMPOSE_RUN aligns with the PR objective and keeps all version bumps inside containers.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +56 to +58
FRONTEND_YARN = $(COMPOSE_RUN) -w /app/src/frontend node yarn
FRONTEND_CONVERSATIONS_YARN = $(COMPOSE_RUN) -w /app/src/frontend/apps/conversations node yarn
FRONTEND_CONVERSATIONS_YARN_3000 = $(COMPOSE_RUN) -p 3000:3000 -w /app/src/frontend/apps/conversations node yarn
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Find compose files in the repository
find . -name 'docker-compose*.yml' -o -name 'compose*.yml' 2>/dev/null | head -20

Repository: suitenumerique/conversations

Length of output: 137


🏁 Script executed:

# Search for node service and frontend service definitions in compose files
rg -l 'services:' --type yaml | head -10

Repository: suitenumerique/conversations

Length of output: 131


🏁 Script executed:

cat compose.yml

Repository: suitenumerique/conversations

Length of output: 4793


Confirm: The node service writes node_modules to the host via bind mount.

The node service mounts the entire repository as a bind mount (.:/app), which means yarn installing dependencies at /app/src/frontend/node_modules will write directly to ./src/frontend/node_modules on your host machine. This contrasts with the frontend-development service, which uses anonymous volumes (/home/frontend/node_modules and /home/frontend/apps/conversations/node_modules) to prevent host pollution.

To isolate node_modules from the host when running yarn via the Makefile, either:

  • Add anonymous volume overrides to the node service in compose configuration
  • Or adjust the Makefile to mount anonymous volumes for node_modules paths when invoking COMPOSE_RUN
🤖 Prompt for AI Agents
In `@Makefile` around lines 56 - 58, The Makefile target vars FRONTEND_YARN,
FRONTEND_CONVERSATIONS_YARN and FRONTEND_CONVERSATIONS_YARN_3000 run yarn in the
bind-mounted node service so installs write host ./src/frontend/node_modules;
change these variables to add anonymous-volume flags to COMPOSE_RUN so
node_modules is mounted inside the container (not on host). For example, update
FRONTEND_YARN to invoke $(COMPOSE_RUN) with an extra -v
/app/src/frontend/node_modules and update FRONTEND_CONVERSATIONS_YARN and
FRONTEND_CONVERSATIONS_YARN_3000 to add -v
/app/src/frontend/apps/conversations/node_modules (and also
/app/src/frontend/node_modules if needed) so yarn writes to container volumes
rather than the host. Ensure you keep the existing -w paths and port override in
FRONTEND_CONVERSATIONS_YARN_3000.

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

Labels

noChangeLog This does not require a changelog line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants