## 1. Traefik Label Generator - [x] 1.1 Create apps/api/app/services/traefik.py with TraefikLabelGenerator class - [x] 1.2 Implement subdomain generation from tool_id, project_slug, user_slug - [x] 1.3 Generate router labels (rule, service, tls) - [x] 1.4 Generate service labels (loadBalancer, port) - [x] 1.5 Add middleware labels for security headers - [x] 1.6 Write unit tests for label generation ## 2. Backend Integration - [x] 2.1 Integrate label generation into tool instance spawn endpoint - [x] 2.2 Store generated labels in tool_instance metadata - [x] 2.3 Remove/disable labels on tool instance stop - [x] 2.4 Update ToolInstance model to store labels JSON ## 3. Production Docker Compose - [x] 3.1 Create docker-compose.prod.yml with api, web, traefik, db services - [x] 3.2 Configure Traefik service with Let's Encrypt certificates - [x] 3.3 Set up platform and tools networks - [x] 3.4 Add health checks for all services - [x] 3.5 Configure logging (JSON format, rotation) ## 4. Portainer Deployment - [x] 4.1 Create deploy/portainer-stack.yml - [x] 4.2 Add Portainer-specific environment variable documentation - [x] 4.3 Create deploy/.env.example for production - [x] 4.4 Test stack deployment locally with docker compose -f docker-compose.prod.yml ## 5. Documentation - [x] 5.1 Update docs/deployment.md with production deployment steps - [x] 5.2 Add Traefik configuration guide - [x] 5.3 Document subdomain scheme and DNS requirements - [x] 5.4 Update README.md with deployment section ## 6. Testing & Verification - [x] 6.1 Test label generation for all built-in tools - [x] 6.2 Verify Traefik routes correctly in local stack - [x] 6.3 Run backend tests: `cd apps/api && pytest` - [x] 6.4 Run linters: `ruff check app/` and `mypy app/`