Skip to content

Build time issues #7202

@greenhost87

Description

@greenhost87

When deploying a single app from the monorepo, the current Docker flow still behaves monorepo-wide:

  1. Build stage runs root-level yarn build.
  2. Runtime stage copies the full /app directory.

This makes app-level deploys expensive in build time and image size.

Current behavior

  • Builder runs yarn build from repo root (Dockerfile:65).
  • Runtime copies full /app from builder (Dockerfile:75).
  • CI prepares ./out, but it is not app-scoped and includes workspace manifests broadly (.github/workflows/nodejs.condo.ci.yml:70, bin/prune.sh:1).

Why this is a problem

  • Slower CI/CD for app-specific releases.
  • Larger push/pull payloads for single-service deploys.
  • Runtime image includes dependencies unrelated to the target app.
  • In practice, runtime deploys may require transferring very large node_modules directories, even for a single app.

Reproduction (current state)

  1. Build image from repository root.
  2. Measure build duration and final image size.
  3. Inspect runtime image contents and verify unrelated apps/dependencies are present.

Expected behavior

For app-level deployment (@app/<name>):

  • Each sub-project can be built independently (without monorepo-wide build coupling).
  • Build scope is limited to target app + required workspace dependencies only.
  • Runtime image contains only required runtime artifacts/dependencies for target app.
  • Runtime image does not include monorepo-wide node_modules and unrelated app sources.
  • Running one app should not require shipping huge monorepo node_modules.

Request

Could maintainers advise on the recommended Condo approach for:

  • app-scoped Docker builds (instead of root monorepo-wide build),
  • app-scoped runtime dependency packaging,
  • avoiding full /app copy into runtime for single-service deploys?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions