Skip to content

feat: add docker-compose configuration for development environment#1836

Open
gustavobtflores wants to merge 4 commits intokernelci:mainfrom
gustavobtflores:feat/docker-development-environment
Open

feat: add docker-compose configuration for development environment#1836
gustavobtflores wants to merge 4 commits intokernelci:mainfrom
gustavobtflores:feat/docker-development-environment

Conversation

@gustavobtflores
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores commented Apr 2, 2026

Description

This PR introduces a Docker-based development environment with live reload capabilities and a Makefile for standardized project commands.

Changes

  • Add Docker development environment with docker-compose.dev.yml, supporting live reload for both Django backend and Vite frontend
  • Add Makefile with common development, build, and deployment commands
  • Add comprehensive documentation for the development environment in docs/dev-environment.md

How to test

  1. Run docker compose -f docker-compose.dev.yml up and verify live reload works when modifying backend or frontend files
  2. Run make help to see available commands

Closes #1786

@gustavobtflores gustavobtflores self-assigned this Apr 2, 2026
@gustavobtflores gustavobtflores added the Docker Related to a docker setup label Apr 2, 2026
@alanpeixinho
Copy link
Copy Markdown
Contributor

Maybe we could mount our current volume inside the dev container, this way, we would be able to benefit from hot-reload.

@gustavobtflores gustavobtflores force-pushed the feat/docker-development-environment branch 2 times, most recently from 218362e to 432b91c Compare April 24, 2026 18:16
@gustavobtflores gustavobtflores marked this pull request as ready for review April 29, 2026 12:07
@MarceloRobert MarceloRobert requested a review from Copilot April 30, 2026 18:57
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

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.yml for a self-contained dev stack (Django runserver, 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.

Comment thread docker-compose.dev.yml Outdated
Comment thread docs/dev-environment.md Outdated
Comment thread dashboard/Dockerfile.dev Outdated
Comment thread README.md Outdated
Comment thread Makefile Outdated
Comment thread docs/dev-environment.md Outdated
Comment thread docs/dev-environment.md Outdated
Comment thread docs/dev-environment.md
Comment thread docs/dev-environment.md Outdated
Comment thread docs/dev-environment.md
@gustavobtflores gustavobtflores force-pushed the feat/docker-development-environment branch from 432b91c to fddecee Compare May 4, 2026 18:13
Copy link
Copy Markdown
Collaborator

@MarceloRobert MarceloRobert left a comment

Choose a reason for hiding this comment

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

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

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread docker-compose.dev.yml Outdated
WilsonNet and others added 4 commits May 5, 2026 22:45
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
@gustavobtflores gustavobtflores force-pushed the feat/docker-development-environment branch from cfbfc3d to 99aff63 Compare May 6, 2026 01:45
Copy link
Copy Markdown
Collaborator

@MarceloRobert MarceloRobert left a comment

Choose a reason for hiding this comment

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

All good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docker Related to a docker setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a docker-compose-dev file only for development

5 participants