@@ -12,6 +12,53 @@ and testing. Hetzner Cloud support is planned as the next implementation target.
1212The process combines Infrastructure as Code with application deployment automation to
1313provide a streamlined deployment experience, following twelve-factor app methodology.
1414
15+ ## Deployment Process
16+
17+ This project implements a ** four-step deployment workflow** aligned with twelve-factor app principles:
18+
19+ ### Step 1: Configure Environment Variables
20+
21+ Create environment-specific configuration from templates:
22+
23+ - ** Local Development** : ` infrastructure/config/environments/local.env.tpl ` → ` local.env `
24+ - ** Production** : ` infrastructure/config/environments/production.env.tpl ` → ` production.env `
25+
26+ The environment file contains ** all deployment configuration** , including:
27+
28+ - Infrastructure settings (VM specs, network configuration)
29+ - Application secrets (database passwords, API tokens)
30+ - SSL certificate configuration (domains, email for Let's Encrypt)
31+ - Backup and monitoring settings
32+
33+ ### Step 2: Provision Infrastructure
34+
35+ Deploy and configure the target environment:
36+
37+ - ** VM Creation** : Deploy virtual machine with specified resources
38+ - ** System Dependencies** : cloud-init installs Docker, configures firewall, creates users
39+ - ** Network Setup** : Configure firewall rules, SSH access, system security
40+ - ** Platform Readiness** : Environment prepared for application deployment
41+
42+ ### Step 3: Deploy Application (Build + Release + Run)
43+
44+ Deploy the application stack following twelve-factor methodology:
45+
46+ - ** Build Stage** : Prepare application artifacts and configuration templates
47+ - ** Release Stage** :
48+ - Generate SSL certificates (Let's Encrypt or self-signed)
49+ - Create Docker environment files from templates
50+ - Copy application configurations to target VM
51+ - ** Run Stage** : Start Docker Compose stack (Torrust Tracker, MySQL, Nginx, Grafana, Prometheus)
52+
53+ ### Step 4: Validation
54+
55+ Verify deployment health and functionality:
56+
57+ - ** Service Health** : HTTP/UDP endpoint availability checks
58+ - ** Database Connectivity** : MySQL connection and schema validation
59+ - ** Monitoring Access** : Grafana dashboard accessibility
60+ - ** End-to-end Testing** : Tracker announce/scrape functionality
61+
1562## Prerequisites
1663
1764### Local Requirements
0 commit comments