Add Docker Compose setup for full-stack local development#15
Open
anshjaiswal12 wants to merge 1 commit intoClimate-Vision:mainfrom
Open
Add Docker Compose setup for full-stack local development#15anshjaiswal12 wants to merge 1 commit intoClimate-Vision:mainfrom
anshjaiswal12 wants to merge 1 commit intoClimate-Vision:mainfrom
Conversation
Goldokpa
requested changes
Apr 22, 2026
Member
Goldokpa
left a comment
There was a problem hiding this comment.
Great contribution @anshjaiswal12 — Docker Compose support is exactly what was needed for issue #13. The overall approach is solid: the node_modules volume trick, BACKEND_URL proxy in vite.config.ts, and restart policies are all correct. However there are blocking issues before this can merge.
MUST FIX:
- PR targets
maininstead ofdevelop— Per CONTRIBUTING.md all PRs must targetdevelop. Please change the base branch using the Edit button at the top of this PR. - Backend Dockerfile missing CPU-only pip flag — The PR description mentions preventing multi-GB NVIDIA downloads, but the Dockerfile does not include
--extra-index-url https://download.pytorch.org/whl/cpu. Without this, PyTorch will pull CUDA wheels and the image will exceed several GB. Add this flag to the pip install line or provide arequirements-docker.txtpinning CPU wheels. - No healthcheck — frontend starts before backend is ready —
depends_on: backendonly waits for container start, not for FastAPI to be ready. Add a healthcheck on the backend service and usecondition: service_healthyin the frontend depends_on. The /health endpoint already exists in the app. - Backend volume
.:/appmounts everything — This is intentional for hot-reload but should be documented with a comment, and it means the Dockerfile COPY is ignored at runtime.
SUGGESTIONS (non-blocking):
- Remove the
3000:3000port — "in case it's overridden" is not a good pattern; document the env var override instead. -
- Note in README that the frontend
.envcopy step is not required for Docker Compose (BACKEND_URL is set via compose env, not .env).
- Note in README that the frontend
-
-
- Add a note that this is a dev-only setup and a production Dockerfile (nginx + built assets) is a separate follow-up.
What's done well: .dockerignore files are correct, vite.config.ts proxy change is non-breaking for manual setup, README section is clear and well-structured.
- Add a note that this is a dev-only setup and a production Dockerfile (nginx + built assets) is a separate follow-up.
-
Please retarget to develop and address items 1-3 — happy to approve once those are done!
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.
Resolves #13.
What was added
docker-compose.ymlconfiguration linking the FastAPI backend and React Vite frontend.Dockerfileusing the--extra-index-urlpip parameter preventing multi-gigabyte NVIDIA GPU metadata from downloading recursively for local API contexts.README.md.How to test
cp .env.example .env && cp frontend/.env.example frontend/.envdocker-compose up -d --buildWhy it improves DX
Local environment onboarding is extremely unified, ensuring engineers bypass OS-dependency nuances directly through Docker mappings orchestrating both ends simultaneously while maintaining HMR.