29 Commits

Author SHA1 Message Date
root
8a01af8953 chore: 添加 .gitignore 文件 2026-01-05 20:22:25 +08:00
root
11fc10ba8a feat: 添加API授权中间件
为所有API接口添加授权验证,要求请求头中包含有效的API密钥才能访问。

主要变更:
- 新增授权中间件 (internal/middleware/auth.go)
  - 验证 X-API-Key 请求头
  - 密钥值为 xn001624.
  - 无效密钥返回 401 Unauthorized

- 更新路由配置 (cmd/server/main.go)
  - 使用路由组统一应用授权中间件
  - 保护所有文件和存储桶操作接口
  - Swagger 和 Web UI 保持公开访问

- 新增授权使用文档 (docs/AUTH_GUIDE.md)
  - 多语言使用示例 (cURL, JavaScript, Python)
  - 完整的错误说明和授权范围

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-05 20:22:04 +08:00
root
5b66e7d3e7 修改 s3 地址 2026-01-05 19:51:19 +08:00
root
20e9e36d29 docs:更新swagger 文档 2025-12-27 10:44:50 +08:00
root
00a0e583a8 添加存储桶删除功能
- 新增 DeleteBucketHandler 处理存储桶删除请求
- 添加 DELETE /buckets API 端点
- 在前端界面添加删除存储桶按钮功能
- 添加存储桶删除请求验证器

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 16:40:09 +08:00
root
71a5ea5f41 添加文件删除功能 2025-12-19 16:32:20 +08:00
root
c565eb25af Fix deployment stage: add docker-cli installation
- 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>
2025-12-19 10:58:55 +08:00
root
0904060f0c Fix deployment stage: use alpine image and install docker-compose
- Change from non-existent docker/compose image to alpine
- Install docker-compose package in before_script
- Fix deployment stage image pull error

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 10:42:49 +08:00
root
04b689fc95 Fix Dockerfile: add file package installation
- 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>
2025-12-19 10:39:10 +08:00
root
3e1f4083b9 Fix deployment configuration and add docker-compose.yml
- Fix YAML syntax error in GitLab CI/CD pipeline
- Update Docker image path to push/pull from docker directory
- Add docker-compose.yml for proper deployment
- Simplify CI/CD configuration removing complex deployment scripts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 10:36:03 +08:00
root
3d464c747d Fix YAML syntax error in GitLab CI/CD pipeline
- 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>
2025-12-19 10:28:50 +08:00
root
e12ce5c632 Enhance logging for better troubleshooting and debugging
🔧 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>
2025-12-19 10:26:34 +08:00
root
8bfae1588b Simplify deployment using Docker run instead of docker-compose
- 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>
2025-12-19 10:23:51 +08:00
root
2f88022782 Add complete deployment configuration with Docker-in-Docker
- 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>
2025-12-19 10:22:19 +08:00
root
929266c55d Fix: Add image push and comment out deploy stage
- 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>
2025-12-19 10:18:57 +08:00
root
79162a4205 Fix: Configure Go proxy for faster dependency downloads
- 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>
2025-12-19 10:09:18 +08:00
root
0fb7557c27 Fix: Use docker/ prefix for all private registry images
- 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>
2025-12-19 09:47:04 +08:00
root
f894bc212e Revert to using private registry for all images
- Changed .gitlab-ci.yml back to use 192.168.1.154:31010/alpine:latest and docker/compose:latest
- Updated Dockerfile to use private registry alpine image
- Fixed Docker installation order in CI/CD
- All images now consistently use private registry

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:45:01 +08:00
root
b75a396378 Fix CI/CD: Use Docker Hub images as temporary solution
- Reverted to using Docker Hub images (alpine:latest, docker/compose:latest)
- This allows CI/CD to work while private registry is being configured
- TODO: Configure private registry and switch back to private images

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:38:00 +08:00
root
0beb859c54 Update Dockerfile to use private registry for alpine base image
- Changed FROM alpine:latest to FROM 192.168.1.154:31010/alpine:latest
- Added push-images.bat script to help push base images to private registry
- Ensures all CI/CD pipeline uses consistent registry sources

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 09:36:04 +08:00
root
16798c0fac Remove dind service dependency to rely on host docker socket 2025-12-18 15:53:34 +08:00
root
16dc7313d7 Switch CI/CD jobs to use Alpine image and install Docker tools manually 2025-12-18 15:51:36 +08:00
root
13fabbd5fc Fix CI/CD: Use available images from private registry 2025-12-18 15:47:17 +08:00
root
2e297cf82f Configure CI/CD to use private Nexus registry 2025-12-18 15:20:41 +08:00
root
3a7daf66a7 合并远程仓库的更改 2025-12-18 09:54:27 +08:00
root
d7a3083057 init 2025-12-18 09:51:13 +08:00
root
e3a5bc2a6e init 2025-12-18 09:44:32 +08:00
root
8232827835 Initial commit 2025-12-18 09:34:49 +08:00
Administrator
5a48227609 Initial commit 2025-10-31 11:36:04 +00:00