MySQL Slice - Release and Run Commands
Overview
Add MySQL as a database option for Torrust Tracker deployment. This task extends the docker-compose stack with a MySQL service and allows users to choose between SQLite (default) and MySQL through environment configuration, providing production-ready database scalability while maintaining backward compatibility.
Specification
See detailed specification: docs/issues/mysql-slice-release-run-commands.md
(Link will be updated to include issue number after file rename)
🏗️ Architecture Requirements
DDD Layers: Infrastructure + Domain
Module Paths:
src/infrastructure/templating/docker_compose/ - Docker Compose template rendering with MySQL service
src/infrastructure/templating/tracker/ - Tracker configuration template updates for MySQL
src/domain/config/environment/ - Environment configuration schema extensions
Pattern: Template System with Project Generator pattern + Configuration-driven service selection
Module Structure Requirements
Architectural Constraints
Anti-Patterns to Avoid
- ❌ Breaking SQLite deployments when adding MySQL support
- ❌ Hardcoding MySQL credentials in templates
- ❌ Making MySQL mandatory for all deployments
- ❌ Duplicating tracker configuration for each database type
- ❌ Mixing database initialization logic across multiple templates
Implementation Plan
Phase 1: Add MySQL Service to Docker Compose (2-3 hours)
Phase 2: Extend Environment Configuration (1-2 hours)
Phase 3: Conditional Tracker Configuration (2-3 hours)
Phase 4: Service Dependencies and Integration (1-2 hours)
Phase 5: Manual E2E Testing (2-3 hours)
Phase 6: Progressive Configuration Exposure (2-3 hours)
Phase 7: Documentation and Cleanup (1 hour)
Acceptance Criteria
Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR to minimize back-and-forth iterations.
Quality Checks:
Functional Requirements:
Configuration Requirements:
Testing Requirements:
Documentation Requirements:
Related
MySQL Slice - Release and Run Commands
Overview
Add MySQL as a database option for Torrust Tracker deployment. This task extends the docker-compose stack with a MySQL service and allows users to choose between SQLite (default) and MySQL through environment configuration, providing production-ready database scalability while maintaining backward compatibility.
Specification
See detailed specification: docs/issues/mysql-slice-release-run-commands.md
(Link will be updated to include issue number after file rename)
🏗️ Architecture Requirements
DDD Layers: Infrastructure + Domain
Module Paths:
src/infrastructure/templating/docker_compose/- Docker Compose template rendering with MySQL servicesrc/infrastructure/templating/tracker/- Tracker configuration template updates for MySQLsrc/domain/config/environment/- Environment configuration schema extensionsPattern: Template System with Project Generator pattern + Configuration-driven service selection
Module Structure Requirements
.teraextension for dynamic templatesArchitectural Constraints
Anti-Patterns to Avoid
Implementation Plan
Phase 1: Add MySQL Service to Docker Compose (2-3 hours)
templates/docker-compose/docker-compose.ymlPhase 2: Extend Environment Configuration (1-2 hours)
database.driverfield to environment schemaPhase 3: Conditional Tracker Configuration (2-3 hours)
Phase 4: Service Dependencies and Integration (1-2 hours)
depends_onin docker-composePhase 5: Manual E2E Testing (2-3 hours)
Phase 6: Progressive Configuration Exposure (2-3 hours)
Phase 7: Documentation and Cleanup (1 hour)
Acceptance Criteria
Quality Checks:
./scripts/pre-commit.shFunctional Requirements:
Configuration Requirements:
database.driverfieldsqlite3if driver not specifiedsqlite3ormysql)Testing Requirements:
Documentation Requirements:
Related