- Add EventPublisher interface in biz layer for domain event publishing
- Wire EventBusPublisher (Watermill EventBus adapter) into FileUsecase, FolderUsecase, ShareUsecase
- Publish events after UploadFile, DeleteFile, CreateFolder, DeleteFolder, CreateShare
- Implement CQRSHandler with logging event handlers for all 6 event types
- Register event handlers via CQRSBus.RegisterHandlers using Watermill EventProcessor
- Store subscriber and wmLogger in CQRSBus for EventProcessor wiring
- Expose SqlDB() on Data struct for Watermill SQL pub/sub
- Start Watermill router in goroutine alongside Kratos app with graceful close
- Use appContext wrapper struct to pass CQRSBus through Wire DI graph
Add HS256 JWT authentication to both HTTP and gRPC servers using
Kratos jwt middleware with selector to skip auth for public share
endpoints (GetShareInfo, DownloadShare). Wire DI updated to inject
conf.Auth into server constructors.
Create internal/server package with HTTP and gRPC server constructors
using Kratos transport layer. Includes Wire provider set for DI,
recovery/tracing/logging middleware, and graceful nil-safe config handling.
Fix .gitignore 'server' pattern to only match root-level binary.
Implements all 23 FileServiceServer methods: file upload/download/list/
preview/content/delete, multipart upload lifecycle, bucket CRUD, folder
CRUD with tree support, file-to-folder upload, file move, and share link
create/delete/info/download. Includes PO-to-proto conversion helpers.
Add new framework dependencies needed for the Gin-to-Kratos migration:
- go-kratos/kratos/v2 (HTTP/gRPC transport, config, middleware, JWT auth)
- google/wire (compile-time dependency injection)
- ThreeDotsLabs/watermill + watermill-sql/v2 (event-driven CQRS)
- gorm.io/gorm + gorm.io/driver/postgres (PostgreSQL ORM)
The old Gin/Swagger deps remain as direct deps since existing code still
imports them. They will be removed in later migration tasks when code is
rewritten. Blank imports in internal/deps.go ensure go mod tidy keeps
the new deps until actual code imports them directly.
go.mod requires Go 1.25 (gin-contrib/cors v1.7.7 dependency).
Switch from private registry to Docker Hub for base images since
they're public and the registry only has Go 1.24.
- Install docker-cli before docker-compose in deployment stage
- Fix 'docker: not found' error in deploy_service job
- Ensure both docker and docker-compose are available
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add file package to runtime environment
- Fix build error where file command was not found
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced Bash for loop syntax that's not supported in GitLab CI
- Converted: "for i in {1..15}; do...done" to individual echo-sleep commands
- Maintains the same functionality with 15-second wait countdown
- Each step now properly formatted as separate YAML array entries
- Preserves the enhanced logging experience while fixing syntax compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
🔧 CI/CD Pipeline Improvements:
- Added comprehensive logging with emojis for better readability
- Detailed environment information display
- Step-by-step progress tracking with timestamps
- Enhanced Docker build progress with --progress=plain
- Container deployment validation and health checks
- Network connectivity testing and port monitoring
- Storage usage reporting and cleanup operations
🏗️ Dockerfile Enhancements:
- Added verbose logging for every build stage
- Go environment verification and dependency tracking
- Detailed compilation progress with file sizes
- Runtime environment preparation checks
- Built-in health check configuration
- Enhanced startup logging with service URLs
- Error-friendly fallback messages
📊 Debugging Features:
- Build log preservation (build.log file)
- Container state inspection and JSON formatting
- Port listening status verification
- Service availability testing with retries
- Comprehensive error reporting with context
- Container ID tracking for reference
🎯 Key Benefits:
- Easy problem identification during CI/CD
- Clear visibility into build and deployment process
- Service health monitoring and validation
- Streamlined troubleshooting workflow
- Professional logging presentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed docker-compose dependency, using direct Docker run commands
- Kept all deployment features: auto-restart, health check, logging
- Direct Docker container deployment from private registry image
- Added comprehensive environment variables for RustFS backend
- Maintained port mapping (8080:8080) and volume mounting
- Added detailed status reporting and health check validation
- Works with local Dockerfile only, no docker-compose.yml needed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added docker-in-docker service for container deployment
- Created dynamic docker-compose.yml with full configuration
- Added container auto-restart policy (unless-stopped)
- Configured health check for service monitoring
- Added environment variables for RustFS backend
- Set up port mapping (8080:8080) and network configuration
- Added logging configuration with rotation
- Included deployment validation and status reporting
- Service will auto-pull from private registry and deploy
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added docker tag and push commands to push image to private registry
- Pushed image will be: 192.168.1.154:31010/file-system-server:latest
- Commented out deploy_service stage that requires shell runner
- Now CI/CD will successfully build and push image to your registry
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added GOPROXY=https://goproxy.cn,direct for Chinese mirror
- Added GOSUMDB=sum.golang.google.cn for checksum database
- Fixes timeout issues when downloading Go modules during CI/CD build
- Resolves build failure due to network connectivity to proxy.golang.org
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated all image paths to include docker/ prefix
- .gitlab-ci.yml: 192.168.1.154:31010/docker/alpine:latest
- Dockerfile: Both build and run stages use docker/alpine:latest
- Matches private registry structure where images are in docker/ directory
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>