中文 | English
AnySpecs All-in-one Platform
- Multi-role User Management: Support for Guest, Common User, Admin, and Root User roles
- Multiple Login Methods: Username/Password, GitHub OAuth
- Email Verification: Email registration verification and password reset
- Secure Authentication: JWT Token-based API authentication with session management
- Permission Control: Granular file upload/download permission control
- File Upload/Download: Support for multiple file types with batch operations
- File Permission Management: Role-based file access control
- File Preview: Support for images, documents, and various formats
- Storage Management: Local storage and cloud storage configuration support
- Rate Limiting: Redis-based API access frequency control
- CORS Support: Cross-Origin Resource Sharing configuration
- Static File Caching: Optimized static resource loading
- Logging System: Complete operation log recording
- Cloudflare Turnstile: Anti-bot verification
- Responsive Design: Perfect support for desktop and mobile devices
- Modern UI: Elegant interface based on Semantic UI React
- Real-time Notifications: Toast message notification system
- Multi-language Support: Chinese and English interface switching
- Web Framework: Gin (Go)
- Database: SQLite (default) / MySQL / PostgreSQL
- Cache: Redis
- ORM: GORM
- Authentication: JWT + Session
- File Processing: Go standard library
- Framework: React 18
- UI Components: Semantic UI React
- Routing: React Router v6
- State Management: React Context + Hooks
- HTTP Client: Axios
- Build Tool: Create React App
# 1. Clone project
git clone https://github.com/anyspecs/asap.git
cd asap
# 2. Configure environment variables
cp env.example .env
# Edit .env file and set necessary environment variables
# 3. Start all services with one command
docker-compose up -d
# 4. Check service status
docker-compose ps
# 5. Access application
# Frontend: http://localhost or https://localhost
# Backend API: http://localhost:3000Based on env.config file:
# Redis Configuration
REDIS_PASSWORD=your_secure_password
REDIS_PORT=6380
# Application Configuration
SESSION_SECRET=your_session_strong_password
UPLOAD_PATH=/data/upload
DB_PATH=/data/database
# Domain Configuration
DOMAIN=your-domain.com
ENABLE_TLS=true
# Default Admin Account
DEFAULT_ROOT_USERNAME=admin
DEFAULT_ROOT_PASSWORD=your_admin_init_pwdSee setupssl/ssl-setup.md for details.
# Build and start all services
docker-compose up -d --build
# Check service status
docker-compose ps
# View logs
docker-compose logs -f frontend
docker-compose logs -f backend
docker-compose logs -f redis# Stop all services
docker-compose down
# Restart specific service
docker-compose restart frontend
docker-compose restart backend
# Rebuild and start
docker-compose down
docker-compose build --no-cache
docker-compose up -d
# View resource usage
docker stats| Service | Port | Description |
|---|---|---|
| Frontend | 80/443 | HTTP/HTTPS access port |
| Backend | 3000 | API service port (local access only) |
| Redis | 6380 | Cache service port (local access only) |
volumes:
redis_data: # Redis data
backend_data: # Backend data (database, uploaded files)
backend_logs: # Backend logs
frontend_logs: # Frontend logs# Check service health status
docker-compose ps
# Manual health check
curl -f http://localhost:3000/api/status
curl -f http://localhost/api/status
# View health check logs
docker-compose logs frontend | grep health# View real-time logs
docker-compose logs -f --tail=100
# Clean logs
docker system prune -f
# Log rotation configuration
# Configure logrotate on host machine# Backup data
docker run --rm -v anyspecs_backend_data:/data -v $(pwd):/backup \
alpine tar czf /backup/asap-backup-$(date +%Y%m%d).tar.gz /data
# Restore data
docker run --rm -v anyspecs_backend_data:/data -v $(pwd):/backup \
alpine tar xzf /backup/asap-backup-20250101.tar.gz -C /data# Firewall configuration
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
# Disable root login
# Configure SSH key authentication
# Regularly update system and Docker images# Use Docker Swarm or Kubernetes
docker swarm init
docker stack deploy -c docker-compose.yml asap
# Load balancer configuration
# Database master-slave replication
# Redis cluster configuration# Download latest version
wget https://github.com/anyspecs/releases/latest/download/asap-linux-amd64 -O asap
chmod +x asap
# Start application
./asap --port 3000 --log-dir ./logs# Start Redis
docker run -d --name redis-asap -p 6379:6379 redis:7-alpine
# Set environment variable
export REDIS_CONN_STRING=redis://localhost:6379
./asap --port 3000 --log-dir ./logs- Visit http://localhost:3000
- Login with root account
- Enter system settings to configure SMTP, OAuth, etc.
Configure SMTP server in system settings, supporting:
- QQ Mail, Gmail, 163 Mail and other mainstream providers
- Support for STARTTLS (port 587) and SSL (port 465)
- Used for email verification and password reset
- Create OAuth App on GitHub
- Set callback URL:
http://yourdomain.com/oauth/github - Fill in Client ID and Secret in system settings
- Guest Permissions: Configurable upload/download permissions
- User Permissions: Role-based file access control
- Admin Permissions: Complete file management permissions
- CPU: 1 core
- Memory: 512MB
- Storage: 1GB available space
- OS: Linux/macOS/Windows
- CPU: 2+ cores
- Memory: 2GB+
- Storage: 10GB+ available space
- Redis: For caching and session storage
Welcome to submit Issues and Pull Requests!
This project is licensed under the MIT License.