@@ -278,7 +278,8 @@ Based on current implementation status, these areas need extension or still requ
278278
2792792 . ** Environment Configuration** : (one-time, deployment-specific)
280280
281- - ❌ ** Cannot automate** : Configure ` DOMAIN_NAME ` and ` CERTBOT_EMAIL ` (deployment-specific values)
281+ - ❌ ** Cannot automate** : Configure ` TRACKER_DOMAIN ` , ` GRAFANA_DOMAIN ` and ` CERTBOT_EMAIL `
282+ (deployment-specific values)
282283 - ⏱️ ** Time required** : ~ 2 minutes
283284 - 📋 ** Guidance** : Template with clear placeholders and validation
284285
@@ -467,8 +468,9 @@ Variables already added:
467468
468469``` bash
469470# === SSL CERTIFICATE CONFIGURATION ===
470- # Domain name for SSL certificates (required for production)
471- DOMAIN_NAME=REPLACE_WITH_YOUR_DOMAIN
471+ # Domain names for SSL certificates (required for production)
472+ TRACKER_DOMAIN=REPLACE_WITH_YOUR_TRACKER_DOMAIN
473+ GRAFANA_DOMAIN=REPLACE_WITH_YOUR_GRAFANA_DOMAIN
472474# Email for Let's Encrypt certificate registration (required for production)
473475CERTBOT_EMAIL=REPLACE_WITH_YOUR_EMAIL
474476# Enable SSL certificates (true for production, false for testing)
@@ -487,8 +489,9 @@ Variables already added:
487489
488490``` bash
489491# === SSL CERTIFICATE CONFIGURATION ===
490- # Domain name for SSL certificates (local testing with fake domains)
491- DOMAIN_NAME=test.local
492+ # Domain names for SSL certificates (local testing with fake domains)
493+ TRACKER_DOMAIN=tracker.test.local
494+ GRAFANA_DOMAIN=grafana.test.local
492495# Email for certificate registration (test email for local)
493496494497# Enable SSL certificates (true for production, false for testing)
@@ -532,7 +535,7 @@ validate_environment() {
532535
533536** REQUIRED** : Extend this function to validate SSL variables:
534537
535- - ` DOMAIN_NAME ` (should not be placeholder value )
538+ - ` TRACKER_DOMAIN ` and ` GRAFANA_DOMAIN ` (should not be placeholder values )
536539- ` CERTBOT_EMAIL ` (should not be placeholder value)
537540- ` ENABLE_SSL ` (should be true/false)
538541- ` ENABLE_DB_BACKUPS ` (should be true/false)
@@ -699,7 +702,8 @@ The recommended workflow follows the [Torrust production deployment guide](https
699702``` bash
700703# Step 1: Deploy with HTTP-only nginx configuration
701704cp ../infrastructure/config/templates/application/nginx/nginx-http.conf.tpl /var/lib/torrust/proxy/etc/nginx-conf/default.conf
702- sed -i " s/\$ {DOMAIN_NAME}/torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
705+ sed -i " s/\$ {TRACKER_DOMAIN}/tracker.torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
706+ sed -i " s/\$ {GRAFANA_DOMAIN}/grafana.torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
703707docker compose up -d
704708```
705709
@@ -745,7 +749,8 @@ docker compose -f compose.test.yaml up -d pebble pebble-challtestsrv
745749
746750# Step 2: Set up test nginx configuration
747751cp ../infrastructure/config/templates/application/nginx/nginx-http.conf.tpl /var/lib/torrust/proxy/etc/nginx-conf/default.conf
748- sed -i " s/\$ {DOMAIN_NAME}/test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
752+ sed -i " s/\$ {TRACKER_DOMAIN}/tracker.test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
753+ sed -i " s/\$ {GRAFANA_DOMAIN}/grafana.test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
749754
750755# Step 3: Start application services
751756docker compose -f compose.test.yaml up -d
@@ -1165,7 +1170,8 @@ twelve-factor deployment scripts.
11651170` ` ` bash
11661171# Add these new variables to existing template
11671172# === SSL CERTIFICATE CONFIGURATION ===
1168- DOMAIN_NAME=REPLACE_WITH_YOUR_DOMAIN
1173+ TRACKER_DOMAIN=REPLACE_WITH_YOUR_TRACKER_DOMAIN
1174+ GRAFANA_DOMAIN=REPLACE_WITH_YOUR_GRAFANA_DOMAIN
11691175CERTBOT_EMAIL=REPLACE_WITH_YOUR_EMAIL
11701176ENABLE_SSL=true
11711177
@@ -1179,7 +1185,8 @@ BACKUP_RETENTION_DAYS=7
11791185` ` ` bash
11801186# Add these new variables to existing template
11811187# === SSL CERTIFICATE CONFIGURATION ===
1182- DOMAIN_NAME=test.local
1188+ TRACKER_DOMAIN=tracker.test.local
1189+ GRAFANA_DOMAIN=grafana.test.local
1183119011841191ENABLE_SSL=false
11851192
@@ -1218,15 +1225,15 @@ setup_ssl_automation() {
12181225 log_info "Setting up SSL certificates (Let's Encrypt)..."
12191226
12201227 # Validate environment variables
1221- if [[ -z "${DOMAIN_NAME :-}" || -z "${CERTBOT_EMAIL:-}" ]]; then
1222- log_error "SSL requires DOMAIN_NAME and CERTBOT_EMAIL in environment config"
1228+ if [[ -z "${TRACKER_DOMAIN:-}" || -z "${GRAFANA_DOMAIN :-}" || -z "${CERTBOT_EMAIL:-}" ]]; then
1229+ log_error "SSL requires TRACKER_DOMAIN, GRAFANA_DOMAIN and CERTBOT_EMAIL in environment config"
12231230 exit 1
12241231 fi
12251232
12261233 # DNS validation and certificate generation
12271234 vm_exec "${vm_ip}" "
12281235 cd /home/torrust/github/torrust/torrust-tracker-demo/application
1229- ./share/bin/ssl_setup.sh '${DOMAIN_NAME }' '${CERTBOT_EMAIL}'
1236+ ./share/bin/ssl_setup.sh '${TRACKER_DOMAIN}' '${GRAFANA_DOMAIN }' '${CERTBOT_EMAIL}'
12301237 " "SSL certificate setup"
12311238
12321239 # Add SSL renewal crontab using template
@@ -1461,7 +1468,7 @@ This approach ensures **backward compatibility** while adding new automation fea
14611468**Manual Steps That Will Still Be Required**:
14621469
14631470- **DNS Configuration**: Point domain A records to server IP (one-time setup)
1464- - **Environment Variables**: Configure `DOMAIN_NAME ` and `CERTBOT_EMAIL` in production.env
1471+ - **Environment Variables**: Configure `TRACKER_DOMAIN`, `GRAFANA_DOMAIN ` and `CERTBOT_EMAIL` in production.env
14651472 (one-time setup)
14661473- **SSL Certificate Generation**: Run guided SSL setup script after DNS configuration (one-time setup)
14671474- **Grafana Initial Setup**: Configure dashboards and data sources (optional, post-deployment)
@@ -1586,7 +1593,7 @@ optionally enable HTTPS functionality using the standalone SSL setup scripts.
15861593 - ` grafana.yourdomain.com` → Server IP
15871594
158815953. **Environment Configuration** :
1589- - ` DOMAIN_NAME ` set to your actual domain in `.env`
1596+ - ` TRACKER_DOMAIN ` and `GRAFANA_DOMAIN` set to your actual domains in `.env`
15901597 - ` CERTBOT_EMAIL` set to your email address
15911598
15921599# ## SSL Setup Workflow
0 commit comments