Chore: update md and make command
This commit is contained in:
parent
f617025e01
commit
ea31261bff
3 changed files with 256 additions and 47 deletions
103
CLAUDE.md
103
CLAUDE.md
|
@ -375,39 +375,120 @@ make format
|
|||
|
||||
## Development & Deployment
|
||||
|
||||
### Local Development Setup
|
||||
### Cross-Platform Development Setup
|
||||
The project supports cross-platform development with automatic Python command detection:
|
||||
- **macOS/Linux**: Automatically uses `python3` and `pip3`
|
||||
- **Windows**: Falls back to `python` and `pip`
|
||||
- **No manual configuration needed**
|
||||
|
||||
### Step-by-Step Setup Guide
|
||||
|
||||
#### 1. Clone and Setup
|
||||
```bash
|
||||
# Install dependencies
|
||||
git clone <repository-url>
|
||||
cd python-detector-worker
|
||||
|
||||
# Check environment information
|
||||
make env-info
|
||||
```
|
||||
|
||||
#### 2. Install Dependencies
|
||||
```bash
|
||||
# Install production dependencies
|
||||
make install
|
||||
|
||||
# Install development dependencies (recommended)
|
||||
make install-dev
|
||||
|
||||
# Run the application
|
||||
# Verify installation
|
||||
make check-deps
|
||||
```
|
||||
|
||||
#### 3. Run the Application
|
||||
```bash
|
||||
# Development mode (staging port 8001 with auto-reload)
|
||||
make run-staging
|
||||
|
||||
# Production mode (port 8000 with auto-reload)
|
||||
make run
|
||||
|
||||
# Run with debug mode
|
||||
# Production mode (port 8000 without auto-reload)
|
||||
make run-prod
|
||||
|
||||
# Debug mode (staging port 8001 with verbose logging)
|
||||
make run-debug
|
||||
```
|
||||
|
||||
# Run tests
|
||||
make test
|
||||
#### 4. Verify Setup
|
||||
```bash
|
||||
# Check application health
|
||||
curl http://localhost:8001/health # For staging
|
||||
curl http://localhost:8000/health # For production
|
||||
|
||||
# Format code
|
||||
make format
|
||||
# Run quick tests
|
||||
make test-fast
|
||||
|
||||
# Run quality checks
|
||||
make quality
|
||||
# Check code quality
|
||||
make lint
|
||||
```
|
||||
|
||||
### Local Development Commands
|
||||
|
||||
#### Application Execution
|
||||
```bash
|
||||
make run # Production mode (port 8000) with reload
|
||||
make run-staging # Staging mode (port 8001) with reload
|
||||
make run-prod # Production mode (port 8000) without reload
|
||||
make run-debug # Debug mode (staging port 8001) with verbose logging
|
||||
```
|
||||
|
||||
#### Code Quality & Testing
|
||||
```bash
|
||||
# Code formatting and quality
|
||||
make format # Format code with black & isort
|
||||
make lint # Run linting (flake8, mypy)
|
||||
make quality # Run all quality checks
|
||||
|
||||
# Testing
|
||||
make test # Run all tests with coverage
|
||||
make test-unit # Run unit tests only
|
||||
make test-integration # Run integration tests
|
||||
make test-performance # Run performance benchmarks
|
||||
make test-fast # Run fast tests only
|
||||
make test-coverage # Generate detailed coverage report
|
||||
|
||||
# Development utilities
|
||||
make clean # Clean build artifacts
|
||||
make env-info # Show environment details
|
||||
make version # Show application version
|
||||
```
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
#### Basic Docker Operations
|
||||
```bash
|
||||
# Build container
|
||||
make docker-build
|
||||
|
||||
# Run container
|
||||
# Run container (production port 8000)
|
||||
make docker-run
|
||||
|
||||
# Run container (staging port 8001)
|
||||
make docker-run-staging
|
||||
|
||||
# Development container with volume mounts
|
||||
make docker-dev
|
||||
```
|
||||
|
||||
#### Docker Environment Variables
|
||||
```bash
|
||||
# Run with custom port
|
||||
docker run -p 8001:8001 -e DETECTOR_WORKER_PORT=8001 detector-worker
|
||||
|
||||
# Run with configuration
|
||||
docker run -v $(PWD)/config.json:/app/config.json detector-worker
|
||||
```
|
||||
|
||||
### Configuration Management
|
||||
- **Environment Variables**: Override default configuration
|
||||
- **config.json**: Development and production settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue