Skip to content

fix: resolve Docker build failures when EE submodule is absent#10

Open
chenchenchenchencj wants to merge 2 commits intomainfrom
fix/docker-build-without-ee
Open

fix: resolve Docker build failures when EE submodule is absent#10
chenchenchenchencj wants to merge 2 commits intomainfrom
fix/docker-build-without-ee

Conversation

@chenchenchenchencj
Copy link
Copy Markdown
Collaborator

Summary

Fixes three independent build failures that prevent docker compose build from succeeding when the ee git submodule is not initialized — which is the default case for users following the Quick Start guide.

  • Dockerfile: mkdir -p eemkdir -p ee/frontend so COPY --from=context /ctx/ee/frontend/ doesn't fail on a missing path
  • cli/pyproject.toml: Remove legacy License :: OSI Approved :: Apache Software License classifier that conflicts with the license = "Apache-2.0" field under PEP 639 (enforced by newer setuptools)
  • frontend/vite.config.ts: Detect EE presence by checking for routes.ts instead of just the directory; add a Vite stub plugin (eeStubPlugin) that provides empty modules for @ee/ imports, allowing Rollup to resolve them in dead code branches before tree-shaking eliminates them
  • docker-compose.yml: Make host port configurable via APP_PORT env var (defaults to 8000)

Closes #7, closes #8, closes #9

Test Plan

  • docker compose build succeeds on a fresh clone (without git submodule init)
  • docker compose up -d starts backend and serves the web UI
  • docker compose build still succeeds when EE submodule IS initialized
  • APP_PORT=3000 docker compose up -d correctly maps to port 3000

Made with Cursor

- Dockerfile: create ee/frontend (not just ee) so COPY doesn't fail
- cli/pyproject.toml: remove legacy License classifier conflicting with
  PEP 639 license expression in newer setuptools
- frontend/vite.config.ts: detect EE by checking for routes file instead
  of just the directory; add Vite stub plugin so Rollup can resolve @EE
  imports in dead code branches without failing
- docker-compose.yml: make host port configurable via APP_PORT env var

Closes #7, closes #8, closes #9

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 18, 2026 07:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Docker/packaging/frontend build failures when the ee git submodule is not initialized (default Quick Start path), ensuring docker compose build succeeds in OSS-only checkouts.

Changes:

  • Ensure the Docker build context always contains ee/frontend so the frontend stage COPY --from=context doesn’t fail.
  • Remove the legacy Python license classifier that conflicts with PEP 639 enforcement in newer setuptools.
  • Improve frontend EE detection and add a Vite stub plugin so @ee/* imports can be resolved (and later tree-shaken) when EE is absent.
  • Make the backend host port configurable via APP_PORT (default 8000).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Dockerfile Creates ee/frontend in the context stage to prevent missing-path COPY failures.
cli/pyproject.toml Removes legacy License :: ... classifier to satisfy PEP 639/setuptools validation.
frontend/vite.config.ts Detects EE by presence of routes entrypoint and stubs @ee/* imports when EE isn’t present.
docker-compose.yml Parameterizes published backend port with APP_PORT while keeping the same container port.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The selenium service uses `profiles: ["build"]`, so plain
`docker compose build` skips it. Change the documented command to
`docker compose --profile build build` and inline the ARM note as a
comment for better discoverability.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants