feat: add docker-compose configuration for development environment#1836
Open
gustavobtflores wants to merge 4 commits intokernelci:mainfrom
Open
feat: add docker-compose configuration for development environment#1836gustavobtflores wants to merge 4 commits intokernelci:mainfrom
gustavobtflores wants to merge 4 commits intokernelci:mainfrom
Conversation
Contributor
|
Maybe we could mount our current volume inside the dev container, this way, we would be able to benefit from hot-reload. |
218362e to
432b91c
Compare
There was a problem hiding this comment.
Pull request overview
Adds a dedicated Docker Compose development stack (backend + frontend + proxy) with live-reload, plus helper tooling and documentation to standardize local contributor workflows (issue #1786).
Changes:
- Introduces
docker-compose.dev.ymlfor a self-contained dev stack (Djangorunserver, Vite HMR, Nginx proxy). - Adds a dev-only Vite Dockerfile and TanStack Router tmp-dir ignores.
- Adds a Makefile and new
docs/dev-environment.md, and links it from the root README.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
proxy/etc/nginx/templates/dev.conf.template |
Dev Nginx template to route /api to backend and / to Vite (incl. WS upgrade headers). |
docs/dev-environment.md |
New end-to-end documentation for running the dev stack with live reload. |
docker-compose.dev.yml |
New Compose stack for dev services (backend, db, redis, vite dev server, proxy). |
dashboard/Dockerfile.dev |
Dev image for running Vite inside Docker. |
dashboard/.gitignore |
Ignores TanStack Router tmp output under src/. |
README.md |
Adds a link to the new dev environment documentation. |
Makefile |
Adds standardized commands (setup/lint/test/ci/dev/clean). |
.gitignore |
Ignores dashboard TanStack Router output directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
432b91c to
fddecee
Compare
Collaborator
MarceloRobert
left a comment
There was a problem hiding this comment.
LGTM, just some comments. Also, I think we can delete the other split .env example files (like .env.backend.example) so that we don't keep useless files in the repo
Adds docker-compose.dev.yml for local development with automatic live reload for both backend and frontend. No changes to existing files. - docker-compose.dev.yml: standalone dev stack (Django runserver + Vite HMR) using the same env file conventions as production - dashboard/Dockerfile.dev: lightweight node image running pnpm dev with src/ and public/ mounted for HMR - proxy/etc/nginx/templates/dev.conf.template: dev nginx config that proxies / to Vite (with WebSocket upgrade for HMR) instead of serving static files - docs/dev-environment.md: contributor docs covering setup, live reload mechanics, migration workflow, edge cases (syntax errors, stale pyc, deleted files, circular imports, package.json changes), and the Docker Desktop inode caveat with workarounds - extend inode caveat to cover macOS and add OrbStack as workaround - remove redundant --build from initial setup command - clarify when --build is needed and what it does - add Swagger UI and ReDoc links to dev environment doc - expose postgres port 5432 and document SQL client connection
cfbfc3d to
99aff63
Compare
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.
Description
This PR introduces a Docker-based development environment with live reload capabilities and a Makefile for standardized project commands.
Changes
docker-compose.dev.yml, supporting live reload for both Django backend and Vite frontendMakefilewith common development, build, and deployment commandsdocs/dev-environment.mdHow to test
docker compose -f docker-compose.dev.yml upand verify live reload works when modifying backend or frontend filesmake helpto see available commandsCloses #1786