feat(docker): add development containers with hot reload - #17
Conversation
Add complete development container environment with hot reload support: - compose.dev.yaml: Development-optimized compose with Dockerfile.dev builds - docker-dev.sh: Startup script with --clean, --logs, --quick, --stop flags - Dockerfile.dev: Per-service dev images with polling-based file watching - sso-platform: Next.js dev server with Fast Refresh - web-dashboard: Next.js dev server with Fast Refresh - api: uvicorn --reload with watchfiles polling - mcp-server: uvicorn --reload with watchfiles polling Key features: - Anonymous volumes for node_modules (platform safety) - Polling-based watching (macOS Docker compatible) - SSO migrations run from host before services start - Project name taskflow-dev distinguishes from production 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive development container environment with hot reload capabilities for all TaskFlow services, enabling rapid iteration during development without image rebuilds.
Key Changes:
- Development-optimized Docker Compose configuration with volume mounts for live code editing
- Automated startup script with multiple operational modes (quick restart, clean volumes, log viewing)
- Service-specific development Dockerfiles with polling-based file watching for cross-platform compatibility
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| compose.dev.yaml | Development Docker Compose with hot reload for all 5 services (postgres, pgadmin, sso-platform, api, mcp-server, web-dashboard) |
| docker-dev.sh | Startup script with flags for quick restart, clean volumes, log viewing, and graceful shutdown |
| dev-local.sh | Alternative local development script for running services without Docker |
| sso-platform/Dockerfile.dev | Next.js development image with Fast Refresh and polling-based file watching |
| web-dashboard/Dockerfile.dev | Next.js development image with Fast Refresh and polling-based file watching |
| packages/api/Dockerfile.dev | FastAPI development image with uvicorn auto-reload and watchfiles polling |
| packages/mcp-server/Dockerfile.dev | MCP server development image with uvicorn auto-reload and watchfiles polling |
| web-dashboard/src/app/page.tsx | Minor content change ("revolutionizes" → "rethinks") for hot reload testing |
| packages/api/src/taskflow_api/main.py | Version bump (1.0.0 → 1.0.1) for hot reload testing |
| .gitignore | Added pnpm-store and .pnpm-store/ to ignore list |
| specs/008-dev-containers/* | Complete specification, plan, tasks, and checklist documentation |
| history/prompts/008-dev-containers/* | Development history and prompt documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo -e "${YELLOW}[1/5] Checking for production containers...${NC}" | ||
| if docker compose -p "$PROD_PROJECT_NAME" ps -q 2>/dev/null | grep -q .; then | ||
| echo -e "${YELLOW} Stopping production containers...${NC}" | ||
| docker compose -p "$PROD_PROJECT_NAME" down 2>/dev/null || true | ||
| echo -e "${GREEN} Production containers stopped.${NC}" | ||
| else | ||
| echo -e "${GREEN} No production containers running.${NC}" | ||
| fi | ||
|
|
||
| # Step 2: Stop existing dev containers | ||
| echo -e "${YELLOW}[2/5] Stopping existing dev containers...${NC}" |
There was a problem hiding this comment.
Inconsistent step numbering: Steps 1-2 show "[X/5]" format, but steps 3-6 show "[X/6]" format. All steps should consistently show the correct total count of 6 steps.
| # Install dependencies first (cached layer) | ||
| COPY pyproject.toml README.md ./ | ||
| COPY src/ ./src/ | ||
| RUN uv pip install --system -e '.[dev]' |
There was a problem hiding this comment.
[nitpick] Consider adding UV_HTTP_TIMEOUT=120 to the uv pip install command for consistency with the MCP server Dockerfile.dev (line 18 in packages/mcp-server/Dockerfile.dev). This ensures both services have the same timeout configuration for dependency installation.
| RUN uv pip install --system -e '.[dev]' | |
| RUN UV_HTTP_TIMEOUT=120 uv pip install --system -e '.[dev]' |
Summary
Add complete development container environment with hot reload support for all 4 application services.
Changes
--clean,--logs,--quick,--stopflagsKey Features
taskflow-devdistinguishes from production containersUsage
Hot Reload
packages/api/src/**/*.py→ auto-reload in ~3-5sweb-dashboard/src/**/*→ Fast Refresh in ~3sTest plan
./docker-dev.shand verify all 5 services start./docker-dev.sh --stopand verify cleanup🤖 Generated with Claude Code