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>
85 lines
2.3 KiB
Plaintext
85 lines
2.3 KiB
Plaintext
# .dockerignore for ColaFlow API
|
|
# Optimizes Docker build context by excluding unnecessary files
|
|
|
|
# ================================================================================================
|
|
# Build Artifacts
|
|
# ================================================================================================
|
|
**/bin/
|
|
**/obj/
|
|
[Dd]ebug/
|
|
[Rr]elease/
|
|
x64/
|
|
x86/
|
|
[Aa][Rr][Mm]/
|
|
[Aa][Rr][Mm]64/
|
|
bld/
|
|
[Bb]in/
|
|
[Oo]bj/
|
|
[Ll]og/
|
|
|
|
# ================================================================================================
|
|
# IDE and Editor Files
|
|
# ================================================================================================
|
|
.vs/
|
|
.vscode/
|
|
.idea/
|
|
*.user
|
|
*.suo
|
|
*.userosscache
|
|
*.sln.docstates
|
|
*.swp
|
|
*~
|
|
|
|
# ================================================================================================
|
|
# Test Results
|
|
# ================================================================================================
|
|
[Tt]est[Rr]esult*/
|
|
[Bb]uild[Ll]og.*
|
|
*.trx
|
|
*.coverage
|
|
*.coveragexml
|
|
TestResults/
|
|
|
|
# ================================================================================================
|
|
# NuGet
|
|
# ================================================================================================
|
|
*.nupkg
|
|
*.snupkg
|
|
packages/
|
|
.nuget/
|
|
|
|
# ================================================================================================
|
|
# Git
|
|
# ================================================================================================
|
|
.git/
|
|
.gitignore
|
|
.gitattributes
|
|
|
|
# ================================================================================================
|
|
# Docker
|
|
# ================================================================================================
|
|
Dockerfile
|
|
.dockerignore
|
|
docker-compose*.yml
|
|
|
|
# ================================================================================================
|
|
# Documentation and Others
|
|
# ================================================================================================
|
|
*.md
|
|
*.log
|
|
*.bak
|
|
*.tmp
|
|
.DS_Store
|
|
Thumbs.db
|
|
.editorconfig
|
|
|
|
# ================================================================================================
|
|
# Environment and Secrets (should never be in Docker context)
|
|
# ================================================================================================
|
|
.env
|
|
.env.local
|
|
appsettings.Development.json
|
|
appsettings.*.json
|
|
*.pfx
|
|
*.pem
|