Yaojia Wang d11df78d1f fix(backend): Fix Dockerfile and add health check endpoint for Docker
This commit fixes the backend Docker configuration to enable one-click
backend startup for frontend developers.

Changes:
- Updated Dockerfile with correct paths for modular monolith architecture
  * Added all module projects (Identity, ProjectManagement, IssueManagement)
  * Optimized layer caching by copying .csproj files first
  * Used alpine runtime image for smaller size (~500MB reduction)
  * Added non-root user (appuser) for security
  * Simplified to single HTTP port (8080) for development
- Enhanced .dockerignore to optimize build context
  * Excluded unnecessary files (docs, git, docker files)
  * Added environment and secret file exclusions
- Added /health endpoint to Program.cs
  * Required for Docker HEALTHCHECK functionality
  * Enables docker-compose to verify backend is ready

Testing:
- Docker build succeeds in ~14 seconds (after first build)
- Backend container starts and passes health check
- Swagger UI accessible at http://localhost:5000/scalar/v1
- Health endpoint returns "Healthy" at http://localhost:5000/health

This implements Phase 1 of DOCKER-DEVELOPMENT-ENVIRONMENT.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 23:25:22 +01:00
2025-11-02 23:55:18 +01:00
2025-11-03 20:02:41 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-03 11:51:02 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
2025-11-04 12:28:53 +01:00
2025-11-04 12:28:53 +01:00
2025-11-02 23:55:18 +01:00
2025-11-02 23:55:18 +01:00
Description
No description provided
3.4 MiB
Languages
C# 88.5%
PowerShell 10.4%
Shell 0.8%
Dockerfile 0.3%