Repository navigation
feat: add Docker Compose dev environment - #27
Merged
Merged
Conversation
Running the app locally meant managing a Python venv and installing frontend dependencies by hand, then starting uvicorn and Vite as two separate manual processes. `docker compose up` now boots both with hot reload, so neither is required for day-to-day development. - backend/Dockerfile.dev and frontend/Dockerfile.dev install dependencies at build time; source is bind-mounted in for reload/HMR. - compose.yaml wires them up on the same ports (8000/5173) the manual workflow already used. Verification (build/lint/analyzer) runs via `docker compose exec`. - Vite's watcher needs polling to see bind-mounted changes under Docker Desktop on Windows; gated behind VITE_USE_POLLING so local (non-Docker) dev is unaffected. - .oxlintrc.json now ignores node_modules/dist explicitly rather than relying on the ambient .gitignore, since the frontend container's bind mount has no .git to discover it from. - The dev Dockerfiles/compose.yaml are entirely separate from the root Dockerfile and render.yaml, which still drive the Render and GitHub Pages deploys unchanged. Closes #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backend/Dockerfile.devandfrontend/Dockerfile.dev(deps baked in at build time) pluscompose.yaml, sodocker compose upruns the backend (--reload, port 8000) and frontend (Vite HMR, port 5173) with source bind-mounted in — no local venv ornode_modulesneeded.docker compose upthe primary documented dev path, with the manual venv/npm steps kept as a fallback; verification commands (build/lint/analyzer) now documented viadocker compose exec.VITE_USE_POLLING-gatedusePollingoption, so local non-Docker dev is unaffected), and oxlint'snode_modulesexclusion was only working locally via ambient.gitignorediscovery — made explicit in.oxlintrc.jsonsince the frontend container's bind mount has no.git.backend/only (--reload-dir) and add per-service.dockerignores, so builds don't ship or watch unrelated large directories likefrontend/node_modules.The existing root
Dockerfileandrender.yaml(Render deploy) and the GitHub Pages workflow are untouched — this is dev tooling only.Closes #26
Test plan
docker compose build— both images build cleandocker compose up— backendGET /api/healthreturns{"status":"ok"}, frontend serves200on/backend/main.pyandfrontend/src/App.tsxwhile the stack was running — both hot-reloadeddocker compose exec backend python -m backend.analyzer sample_project— succeedsdocker compose exec frontend npm run lint— 0 warnings/errors (was lintingnode_modulesbefore the.oxlintrc.jsonfix)docker compose exec frontend npm run build— succeeds/code-review mediumrun against the diff; both findings (repo-wide reload watch, missing per-service.dockerignore) fixed and re-verified